mirror of
https://github.com/home-assistant/core.git
synced 2026-05-27 02:36:00 +01:00
d4aa1b53f2
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
29 lines
635 B
Python
29 lines
635 B
Python
"""Constants for the WiZ Platform integration."""
|
|
|
|
from datetime import timedelta
|
|
|
|
from pywizlight.bulb import PIR_SOURCE
|
|
from pywizlight.exceptions import (
|
|
WizLightConnectionError,
|
|
WizLightNotKnownBulb,
|
|
WizLightTimeOutError,
|
|
)
|
|
|
|
DOMAIN = "wiz"
|
|
DEFAULT_NAME = "WiZ"
|
|
|
|
DISCOVER_SCAN_TIMEOUT = 10
|
|
DISCOVERY_INTERVAL = timedelta(minutes=15)
|
|
|
|
WIZ_EXCEPTIONS = (
|
|
OSError,
|
|
WizLightTimeOutError,
|
|
TimeoutError,
|
|
WizLightConnectionError,
|
|
ConnectionRefusedError,
|
|
)
|
|
WIZ_CONNECT_EXCEPTIONS = (WizLightNotKnownBulb, *WIZ_EXCEPTIONS)
|
|
|
|
SIGNAL_WIZ_PIR = "wiz_pir_{}"
|
|
OCCUPANCY_SOURCES = frozenset({PIR_SOURCE, "wfsens"})
|