hass-core/homeassistant/components/motion_blinds/const.py
starkillerOG 9be7b02613
Fix Motion Blinds checking interface for multiple gateways (#71474)
* fix checking interface for multiple gateways

* fix black

* setup lock for shared multicast listener

* fix black

* bump motionblinds to 0.6.7

* compensate for extra Lock_key

* unregister gateway when unloading

* unsubscribe stop listener

* fix black

* only unsubscribe listener on last gateway remove

* catch OSError for invalid interfaces

* test coverage

* make stop listen on last config entry more robust

* also check ConfigEntryState

* fix black
2022-05-19 10:36:22 +02:00

31 lines
821 B
Python

"""Constants for the Motion Blinds component."""
from homeassistant.const import Platform
DOMAIN = "motion_blinds"
MANUFACTURER = "Motion Blinds, Coulisse B.V."
DEFAULT_GATEWAY_NAME = "Motion Blinds Gateway"
PLATFORMS = [Platform.COVER, Platform.SENSOR]
CONF_WAIT_FOR_PUSH = "wait_for_push"
CONF_INTERFACE = "interface"
DEFAULT_WAIT_FOR_PUSH = False
DEFAULT_INTERFACE = "any"
KEY_GATEWAY = "gateway"
KEY_API_LOCK = "api_lock"
KEY_COORDINATOR = "coordinator"
KEY_MULTICAST_LISTENER = "multicast_listener"
KEY_SETUP_LOCK = "setup_lock"
KEY_UNSUB_STOP = "unsub_stop"
KEY_VERSION = "version"
ATTR_WIDTH = "width"
ATTR_ABSOLUTE_POSITION = "absolute_position"
ATTR_AVAILABLE = "available"
SERVICE_SET_ABSOLUTE_POSITION = "set_absolute_position"
UPDATE_INTERVAL = 600
UPDATE_INTERVAL_FAST = 60
UPDATE_INTERVAL_MOVING = 5