Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Const for LIFX."""
2 
3 import logging
4 
5 DOMAIN = "lifx"
6 
7 TARGET_ANY = "00:00:00:00:00:00"
8 
9 DISCOVERY_INTERVAL = 10
10 # The number of seconds before we will no longer accept a response
11 # to a message and consider it invalid
12 MESSAGE_TIMEOUT = 18
13 # Disable the retries in the library since they are not spaced out
14 # enough to account for WiFi and UDP dropouts
15 MESSAGE_RETRIES = 1
16 OVERALL_TIMEOUT = 15
17 UNAVAILABLE_GRACE = 90
18 
19 # The number of times to retry a request message
20 DEFAULT_ATTEMPTS = 5
21 # The maximum time to wait for a bulb to respond to an update
22 MAX_UPDATE_TIME = 90
23 # The number of tries to send each request message to a bulb during an update
24 MAX_ATTEMPTS_PER_UPDATE_REQUEST_MESSAGE = 5
25 
26 CONF_LABEL = "label"
27 CONF_SERIAL = "serial"
28 
29 IDENTIFY_WAVEFORM = {
30  "transient": True,
31  "color": [0, 0, 1, 3500],
32  "skew_ratio": 0,
33  "period": 1000,
34  "cycles": 3,
35  "waveform": 1,
36  "set_hue": True,
37  "set_saturation": True,
38  "set_brightness": True,
39  "set_kelvin": True,
40 }
41 IDENTIFY = "identify"
42 RESTART = "restart"
43 
44 ATTR_DURATION = "duration"
45 ATTR_INDICATION = "indication"
46 ATTR_INFRARED = "infrared"
47 ATTR_POWER = "power"
48 ATTR_REMAINING = "remaining"
49 ATTR_RSSI = "rssi"
50 ATTR_ZONES = "zones"
51 
52 ATTR_THEME = "theme"
53 
54 HEV_CYCLE_STATE = "hev_cycle_state"
55 INFRARED_BRIGHTNESS = "infrared_brightness"
56 INFRARED_BRIGHTNESS_VALUES_MAP = {
57  0: "Disabled",
58  16383: "25%",
59  32767: "50%",
60  65535: "100%",
61 }
62 DATA_LIFX_MANAGER = "lifx_manager"
63 
64 LIFX_CEILING_PRODUCT_IDS = {176, 177}
65 
66 _LOGGER = logging.getLogger(__package__)