* Add support for options to airq integration Expose to the user the following configuration: 1. A choice between fetching from the device either: a. the averaged (previous and the new default behaviour) or b. noisy momentary sensor reading 2. A toggle to clip (spuriously) negative sensor values (default functionality, previously unexposed) To those ends: - Introduce an `OptionsFlowHandler` alongside with a listener `AirQCoordinator.async_set_options` - Introduce constants to handle represent options - Add tests and strings * Drop OptionsFlowHandler in favour of SchemaOptionsFlowHandler Modify `AirQCoordinator.__init__` to accommodate the change in option handling, and drop `async_set_options` which slipped through the previous commit. * Ruff formatting
11 lines
355 B
Python
11 lines
355 B
Python
"""Constants for the air-Q integration."""
|
|
|
|
from typing import Final
|
|
|
|
CONF_RETURN_AVERAGE: Final = "return_average"
|
|
CONF_CLIP_NEGATIVE: Final = "clip_negatives"
|
|
DOMAIN: Final = "airq"
|
|
MANUFACTURER: Final = "CorantGmbH"
|
|
CONCENTRATION_GRAMS_PER_CUBIC_METER: Final = "g/m³"
|
|
ACTIVITY_BECQUEREL_PER_CUBIC_METER: Final = "Bq/m³"
|
|
UPDATE_INTERVAL: float = 10.0
|