2020-09-28 00:02:20 +00:00
|
|
|
"""Constants for 1-Wire component."""
|
2021-05-11 15:28:17 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
2021-12-03 17:25:22 +00:00
|
|
|
from homeassistant.const import Platform
|
2020-10-09 15:31:05 +00:00
|
|
|
|
2020-09-28 00:02:20 +00:00
|
|
|
CONF_MOUNT_DIR = "mount_dir"
|
|
|
|
CONF_NAMES = "names"
|
|
|
|
|
2020-10-09 15:31:05 +00:00
|
|
|
CONF_TYPE_OWSERVER = "OWServer"
|
|
|
|
CONF_TYPE_SYSBUS = "SysBus"
|
|
|
|
|
2020-10-24 01:57:16 +00:00
|
|
|
DEFAULT_OWSERVER_HOST = "localhost"
|
2020-09-28 00:02:20 +00:00
|
|
|
DEFAULT_OWSERVER_PORT = 4304
|
|
|
|
DEFAULT_SYSBUS_MOUNT_DIR = "/sys/bus/w1/devices/"
|
|
|
|
|
|
|
|
DOMAIN = "onewire"
|
|
|
|
|
2021-12-07 12:59:43 +00:00
|
|
|
DEVICE_KEYS_0_3 = range(4)
|
2021-09-13 11:46:21 +00:00
|
|
|
DEVICE_KEYS_0_7 = range(8)
|
|
|
|
DEVICE_KEYS_A_B = ("A", "B")
|
|
|
|
|
2021-11-09 17:30:05 +00:00
|
|
|
DEVICE_SUPPORT_OWSERVER = {
|
|
|
|
"05": (),
|
|
|
|
"10": (),
|
|
|
|
"12": (),
|
|
|
|
"1D": (),
|
|
|
|
"1F": (),
|
|
|
|
"22": (),
|
|
|
|
"26": (),
|
|
|
|
"28": (),
|
|
|
|
"29": (),
|
|
|
|
"3A": (),
|
|
|
|
"3B": (),
|
|
|
|
"42": (),
|
|
|
|
"7E": ("EDS0066", "EDS0068"),
|
2021-12-07 12:59:43 +00:00
|
|
|
"EF": ("HB_HUB", "HB_MOISTURE_METER", "HobbyBoards_EF"),
|
2021-11-09 17:30:05 +00:00
|
|
|
}
|
|
|
|
DEVICE_SUPPORT_SYSBUS = ["10", "22", "28", "3B", "42"]
|
|
|
|
|
|
|
|
|
2021-10-27 10:02:07 +00:00
|
|
|
MANUFACTURER_MAXIM = "Maxim Integrated"
|
|
|
|
MANUFACTURER_HOBBYBOARDS = "Hobby Boards"
|
|
|
|
MANUFACTURER_EDS = "Embedded Data Systems"
|
|
|
|
|
2021-08-24 08:37:59 +00:00
|
|
|
READ_MODE_BOOL = "bool"
|
|
|
|
READ_MODE_FLOAT = "float"
|
|
|
|
READ_MODE_INT = "int"
|
2020-10-27 13:34:25 +00:00
|
|
|
|
2021-03-02 20:43:59 +00:00
|
|
|
PLATFORMS = [
|
2021-12-03 17:25:22 +00:00
|
|
|
Platform.BINARY_SENSOR,
|
|
|
|
Platform.SENSOR,
|
|
|
|
Platform.SWITCH,
|
2020-09-28 00:02:20 +00:00
|
|
|
]
|