Add support for AirVisual Node/Pro units (#32815)

* Add support for AirVisual Node Pro units

* Fixed tests

* Updated dependencies

* Guard looks cleaner

* Limit options update to geography-based entries

* Docstring

* Use proper precision in display_temp

* Add availability for AirVisualNodeProSensor

* Updated translations

* Samba stuff in play

* Wrap up Samba

* Fix tests

* Remove unnecessary updates

* Normalize labels

* Bump requirements

* Don't include configuration.yaml support for this new functionality

* Fix tests

* Code review

* Code review

* Update coveragerc

* Code review
This commit is contained in:
Aaron Bach 2020-04-22 17:41:14 -06:00 committed by GitHub
parent 4448eb94a1
commit 4d292c2723
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 672 additions and 187 deletions

View file

@ -1,7 +1,11 @@
"""Define AirVisual constants."""
from datetime import timedelta
import logging
DOMAIN = "airvisual"
LOGGER = logging.getLogger(__package__)
INTEGRATION_TYPE_GEOGRAPHY = "Geographical Location"
INTEGRATION_TYPE_NODE_PRO = "AirVisual Node/Pro"
CONF_CITY = "city"
CONF_COUNTRY = "country"
@ -9,6 +13,4 @@ CONF_GEOGRAPHIES = "geographies"
DATA_CLIENT = "client"
DEFAULT_SCAN_INTERVAL = timedelta(minutes=10)
TOPIC_UPDATE = f"{DOMAIN}_update"
TOPIC_UPDATE = f"airvisual_update_{0}"