1
mirror of https://github.com/home-assistant/core synced 2024-10-13 14:52:10 +02:00
ha-core/homeassistant/components/nuki/const.py
Pascal Reeb fb1444c414
Add doorsensor + coordinator to nuki (#40933)
* implemented coordinator + doorsensor

* added async_unload_entry

* small fixes + reauth_flow

* update function

* black

* define _data inside __init__

* removed unused property

* await on update & coverage for binary_sensor

* keep reauth seperate from validate

* setting entities unavailable when connection goes down

* add unknown error when entity is not present

* override extra_state_attributes()

* removed unnecessary else

* moved to locks & openers variables

* removed doorsensorState attribute

* changed config entry reload to a task

* wait for reload
2021-04-06 21:20:57 +02:00

20 lines
377 B
Python

"""Constants for Nuki."""
DOMAIN = "nuki"
# Attributes
ATTR_BATTERY_CRITICAL = "battery_critical"
ATTR_NUKI_ID = "nuki_id"
ATTR_UNLATCH = "unlatch"
# Data
DATA_BRIDGE = "nuki_bridge_data"
DATA_LOCKS = "nuki_locks_data"
DATA_OPENERS = "nuki_openers_data"
DATA_COORDINATOR = "nuki_coordinator"
# Defaults
DEFAULT_PORT = 8080
DEFAULT_TIMEOUT = 20
ERROR_STATES = (0, 254, 255)