Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for 1-Wire component."""
2 
3 from __future__ import annotations
4 
5 from homeassistant.const import Platform
6 
7 DEFAULT_HOST = "localhost"
8 DEFAULT_PORT = 4304
9 
10 DOMAIN = "onewire"
11 
12 DEVICE_KEYS_0_3 = range(4)
13 DEVICE_KEYS_0_7 = range(8)
14 DEVICE_KEYS_A_B = ("A", "B")
15 
16 DEVICE_SUPPORT = {
17  "05": (),
18  "10": (),
19  "12": (),
20  "1D": (),
21  "1F": (),
22  "22": (),
23  "26": (),
24  "28": (),
25  "29": (),
26  "30": (),
27  "3A": (),
28  "3B": (),
29  "42": (),
30  "7E": ("EDS0066", "EDS0068"),
31  "A6": (),
32  "EF": ("HB_HUB", "HB_MOISTURE_METER", "HobbyBoards_EF"),
33 }
34 
35 DEVICE_SUPPORT_OPTIONS = ["28"]
36 
37 PRECISION_MAPPING_FAMILY_28 = {
38  "temperature": "Default",
39  "temperature9": "9 Bits",
40  "temperature10": "10 Bits",
41  "temperature11": "11 Bits",
42  "temperature12": "12 Bits",
43 }
44 
45 OPTION_ENTRY_DEVICE_OPTIONS = "device_options"
46 OPTION_ENTRY_SENSOR_PRECISION = "precision"
47 INPUT_ENTRY_CLEAR_OPTIONS = "clear_device_options"
48 INPUT_ENTRY_DEVICE_SELECTION = "device_selection"
49 
50 MANUFACTURER_MAXIM = "Maxim Integrated"
51 MANUFACTURER_HOBBYBOARDS = "Hobby Boards"
52 MANUFACTURER_EDS = "Embedded Data Systems"
53 
54 READ_MODE_BOOL = "bool"
55 READ_MODE_FLOAT = "float"
56 READ_MODE_INT = "int"
57 
58 PLATFORMS = [
59  Platform.BINARY_SENSOR,
60  Platform.SENSOR,
61  Platform.SWITCH,
62 ]