Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for the crownstone integration."""
2 
3 from __future__ import annotations
4 
5 from typing import Final
6 
7 from homeassistant.const import Platform
8 
9 # Platforms
10 DOMAIN: Final = "crownstone"
11 PROJECT_NAME: Final = "home-assistant-core"
12 PLATFORMS: Final[list[Platform]] = [Platform.LIGHT]
13 
14 # Listeners
15 SSE_LISTENERS: Final = "sse_listeners"
16 UART_LISTENERS: Final = "uart_listeners"
17 
18 # Unique ID suffixes
19 CROWNSTONE_SUFFIX: Final = "crownstone"
20 
21 # Signals (within integration)
22 SIG_CROWNSTONE_STATE_UPDATE: Final = "crownstone.crownstone_state_update"
23 SIG_CROWNSTONE_UPDATE: Final = "crownstone.crownstone_update"
24 SIG_UART_STATE_CHANGE: Final = "crownstone.uart_state_change"
25 
26 # Config flow
27 CONF_USB_PATH: Final = "usb_path"
28 CONF_USB_MANUAL_PATH: Final = "usb_manual_path"
29 CONF_USB_SPHERE: Final = "usb_sphere"
30 # Options flow
31 CONF_USE_USB_OPTION: Final = "use_usb_option"
32 CONF_USB_SPHERE_OPTION: Final = "usb_sphere_option"
33 # USB config list entries
34 DONT_USE_USB: Final = "Don't use USB"
35 REFRESH_LIST: Final = "Refresh list"
36 MANUAL_PATH: Final = "Enter manually"
37 
38 # Crownstone entity
39 CROWNSTONE_INCLUDE_TYPES: Final[dict[str, str]] = {
40  "PLUG": "Plug",
41  "BUILTIN": "Built-in",
42  "BUILTIN_ONE": "Built-in One",
43 }
44 
45 # Crownstone USB Dongle
46 CROWNSTONE_USB: Final = "CROWNSTONE_USB"