Update Notion to use a DataUpdateCoordinator (#38978)

* Update Notion to use a DataUpdateCoordinator

* isort

* Bug
This commit is contained in:
Aaron Bach 2020-08-21 08:10:12 -06:00 committed by GitHub
parent 6fd61be276
commit 31e0ddaec5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 191 additions and 199 deletions

View file

@ -1,13 +1,16 @@
"""Define constants for the Notion integration."""
from datetime import timedelta
DOMAIN = "notion"
DEFAULT_SCAN_INTERVAL = timedelta(minutes=1)
DATA_COORDINATOR = "coordinator"
DATA_CLIENT = "client"
TOPIC_DATA_UPDATE = f"{DOMAIN}_data_update"
TYPE_BINARY_SENSOR = "binary_sensor"
TYPE_SENSOR = "sensor"
SENSOR_BATTERY = "low_battery"
SENSOR_DOOR = "door"
SENSOR_GARAGE_DOOR = "garage_door"
SENSOR_LEAK = "leak"
SENSOR_MISSING = "missing"
SENSOR_SAFE = "safe"
SENSOR_SLIDING = "sliding"
SENSOR_SMOKE_CO = "alarm"
SENSOR_TEMPERATURE = "temperature"
SENSOR_WINDOW_HINGED_HORIZONTAL = "window_hinged_horizontal"
SENSOR_WINDOW_HINGED_VERTICAL = "window_hinged_vertical"