Aioairq

Latest version: v0.4.2

Safety actively analyzes 681748 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.3.2

Original design relied on `aioairq.AirQ.__init__ `checking if the input was a valid IP address or an mDNS of a very specific structure, and raising an `InvalidInput` otherwise.
Now, `aioairq==0.3.2` removes said check completely following [a user's request](https://github.com/CorantGmbH/aioairq/issues/2#issuecomment-1855924466) to allow arbitrary host name and DNS entries. In the config flow, `"cannot_connect"` covers the cases of misspelled or erroneous inputs now, which previously were covered by a dedicated `"invalid_input"`.

0.3.1

get_latest_data implements a convenient public call to fetch from
either "data" or "average" route, as well as allowing to conveniently
toggle negative value clipping (default) and dropping of uncertainties
(default)

0.3.0

Closer to Home Assistant and more disciplined about exceptions

- dedicated submodule for exceptions (still exposed at module level through
`aioairq.__all__`)

- `core.DeviceInfo`:
- **breaking:** `room_type` -> `suggested_area` to further consistency with Home Assistant
- all fields, except for `id` are optional (much like with
`homeassistant.helpers.entity.DeviceInfo`)

- `core.AirQ.get`:
- limited to an explicit set of queries / webserver routes
(namely `AirQ._supported_routes = ["log", "config", "data", "average", "ping"]`).
Other routes return objects with different structure, which aren't consistent
with the current decoding steps
- Error handling for `JSONDecodeError` and `KeyError`, which ought not to happen
with the aforementioned routes (added as a precaution against unexpected firmware
behaviour)

- `encrypt.AESCipher`:
- failed authentication is now inferred as close to the point of failure as possible.
The success or failure of the authentication is based on the ability to decode
the response from the device, thus the error `InvalidAuth` is raised
in `AESCipher.decode`

0.2.0

- Breaking changes:
- `AirQ` constructor requires an `aiohttp.ClientSession`
This session is to be used for all requests during the lifetime of the
object.
- `.test_authentication() -> bool` => `.validate() -> None`
Instead of returning False the new method raises `InvalidAuth`
- `.drop_errors_from_data` => `.drop_uncertainties_from_data`
To avoid ambiguity
- Features:
- `AirQ` provides `fetch_device_info` which returns a subclass of
`NamedTuple` with some handy information (mainly for the purpose of
subsequently passing it on to Home Assistant)

0.1.1

First released version 0.1.1 as published as [PyPi package](https://pypi.org/project/aioairq/0.1.1/)

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.