aiohomematic 2026.1.29__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aiohomematic/__init__.py +110 -0
- aiohomematic/_log_context_protocol.py +29 -0
- aiohomematic/api.py +410 -0
- aiohomematic/async_support.py +250 -0
- aiohomematic/backend_detection.py +462 -0
- aiohomematic/central/__init__.py +103 -0
- aiohomematic/central/async_rpc_server.py +760 -0
- aiohomematic/central/central_unit.py +1152 -0
- aiohomematic/central/config.py +463 -0
- aiohomematic/central/config_builder.py +772 -0
- aiohomematic/central/connection_state.py +160 -0
- aiohomematic/central/coordinators/__init__.py +38 -0
- aiohomematic/central/coordinators/cache.py +414 -0
- aiohomematic/central/coordinators/client.py +480 -0
- aiohomematic/central/coordinators/connection_recovery.py +1141 -0
- aiohomematic/central/coordinators/device.py +1166 -0
- aiohomematic/central/coordinators/event.py +514 -0
- aiohomematic/central/coordinators/hub.py +532 -0
- aiohomematic/central/decorators.py +184 -0
- aiohomematic/central/device_registry.py +229 -0
- aiohomematic/central/events/__init__.py +104 -0
- aiohomematic/central/events/bus.py +1392 -0
- aiohomematic/central/events/integration.py +424 -0
- aiohomematic/central/events/types.py +194 -0
- aiohomematic/central/health.py +762 -0
- aiohomematic/central/rpc_server.py +353 -0
- aiohomematic/central/scheduler.py +794 -0
- aiohomematic/central/state_machine.py +391 -0
- aiohomematic/client/__init__.py +203 -0
- aiohomematic/client/_rpc_errors.py +187 -0
- aiohomematic/client/backends/__init__.py +48 -0
- aiohomematic/client/backends/base.py +335 -0
- aiohomematic/client/backends/capabilities.py +138 -0
- aiohomematic/client/backends/ccu.py +487 -0
- aiohomematic/client/backends/factory.py +116 -0
- aiohomematic/client/backends/homegear.py +294 -0
- aiohomematic/client/backends/json_ccu.py +252 -0
- aiohomematic/client/backends/protocol.py +316 -0
- aiohomematic/client/ccu.py +1857 -0
- aiohomematic/client/circuit_breaker.py +459 -0
- aiohomematic/client/config.py +64 -0
- aiohomematic/client/handlers/__init__.py +40 -0
- aiohomematic/client/handlers/backup.py +157 -0
- aiohomematic/client/handlers/base.py +79 -0
- aiohomematic/client/handlers/device_ops.py +1085 -0
- aiohomematic/client/handlers/firmware.py +144 -0
- aiohomematic/client/handlers/link_mgmt.py +199 -0
- aiohomematic/client/handlers/metadata.py +436 -0
- aiohomematic/client/handlers/programs.py +144 -0
- aiohomematic/client/handlers/sysvars.py +100 -0
- aiohomematic/client/interface_client.py +1304 -0
- aiohomematic/client/json_rpc.py +2068 -0
- aiohomematic/client/request_coalescer.py +282 -0
- aiohomematic/client/rpc_proxy.py +629 -0
- aiohomematic/client/state_machine.py +324 -0
- aiohomematic/const.py +2207 -0
- aiohomematic/context.py +275 -0
- aiohomematic/converter.py +270 -0
- aiohomematic/decorators.py +390 -0
- aiohomematic/exceptions.py +185 -0
- aiohomematic/hmcli.py +997 -0
- aiohomematic/i18n.py +193 -0
- aiohomematic/interfaces/__init__.py +407 -0
- aiohomematic/interfaces/central.py +1067 -0
- aiohomematic/interfaces/client.py +1096 -0
- aiohomematic/interfaces/coordinators.py +63 -0
- aiohomematic/interfaces/model.py +1921 -0
- aiohomematic/interfaces/operations.py +217 -0
- aiohomematic/logging_context.py +134 -0
- aiohomematic/metrics/__init__.py +125 -0
- aiohomematic/metrics/_protocols.py +140 -0
- aiohomematic/metrics/aggregator.py +534 -0
- aiohomematic/metrics/dataclasses.py +489 -0
- aiohomematic/metrics/emitter.py +292 -0
- aiohomematic/metrics/events.py +183 -0
- aiohomematic/metrics/keys.py +300 -0
- aiohomematic/metrics/observer.py +563 -0
- aiohomematic/metrics/stats.py +172 -0
- aiohomematic/model/__init__.py +189 -0
- aiohomematic/model/availability.py +65 -0
- aiohomematic/model/calculated/__init__.py +89 -0
- aiohomematic/model/calculated/climate.py +276 -0
- aiohomematic/model/calculated/data_point.py +315 -0
- aiohomematic/model/calculated/field.py +147 -0
- aiohomematic/model/calculated/operating_voltage_level.py +286 -0
- aiohomematic/model/calculated/support.py +232 -0
- aiohomematic/model/custom/__init__.py +214 -0
- aiohomematic/model/custom/capabilities/__init__.py +67 -0
- aiohomematic/model/custom/capabilities/climate.py +41 -0
- aiohomematic/model/custom/capabilities/light.py +87 -0
- aiohomematic/model/custom/capabilities/lock.py +44 -0
- aiohomematic/model/custom/capabilities/siren.py +63 -0
- aiohomematic/model/custom/climate.py +1130 -0
- aiohomematic/model/custom/cover.py +722 -0
- aiohomematic/model/custom/data_point.py +360 -0
- aiohomematic/model/custom/definition.py +300 -0
- aiohomematic/model/custom/field.py +89 -0
- aiohomematic/model/custom/light.py +1174 -0
- aiohomematic/model/custom/lock.py +322 -0
- aiohomematic/model/custom/mixins.py +445 -0
- aiohomematic/model/custom/profile.py +945 -0
- aiohomematic/model/custom/registry.py +251 -0
- aiohomematic/model/custom/siren.py +462 -0
- aiohomematic/model/custom/switch.py +195 -0
- aiohomematic/model/custom/text_display.py +289 -0
- aiohomematic/model/custom/valve.py +78 -0
- aiohomematic/model/data_point.py +1416 -0
- aiohomematic/model/device.py +1840 -0
- aiohomematic/model/event.py +216 -0
- aiohomematic/model/generic/__init__.py +327 -0
- aiohomematic/model/generic/action.py +40 -0
- aiohomematic/model/generic/action_select.py +62 -0
- aiohomematic/model/generic/binary_sensor.py +30 -0
- aiohomematic/model/generic/button.py +31 -0
- aiohomematic/model/generic/data_point.py +177 -0
- aiohomematic/model/generic/dummy.py +150 -0
- aiohomematic/model/generic/number.py +76 -0
- aiohomematic/model/generic/select.py +56 -0
- aiohomematic/model/generic/sensor.py +76 -0
- aiohomematic/model/generic/switch.py +54 -0
- aiohomematic/model/generic/text.py +33 -0
- aiohomematic/model/hub/__init__.py +100 -0
- aiohomematic/model/hub/binary_sensor.py +24 -0
- aiohomematic/model/hub/button.py +28 -0
- aiohomematic/model/hub/connectivity.py +190 -0
- aiohomematic/model/hub/data_point.py +342 -0
- aiohomematic/model/hub/hub.py +864 -0
- aiohomematic/model/hub/inbox.py +135 -0
- aiohomematic/model/hub/install_mode.py +393 -0
- aiohomematic/model/hub/metrics.py +208 -0
- aiohomematic/model/hub/number.py +42 -0
- aiohomematic/model/hub/select.py +52 -0
- aiohomematic/model/hub/sensor.py +37 -0
- aiohomematic/model/hub/switch.py +43 -0
- aiohomematic/model/hub/text.py +30 -0
- aiohomematic/model/hub/update.py +221 -0
- aiohomematic/model/support.py +592 -0
- aiohomematic/model/update.py +140 -0
- aiohomematic/model/week_profile.py +1827 -0
- aiohomematic/property_decorators.py +719 -0
- aiohomematic/py.typed +0 -0
- aiohomematic/rega_scripts/accept_device_in_inbox.fn +51 -0
- aiohomematic/rega_scripts/create_backup_start.fn +28 -0
- aiohomematic/rega_scripts/create_backup_status.fn +89 -0
- aiohomematic/rega_scripts/fetch_all_device_data.fn +97 -0
- aiohomematic/rega_scripts/get_backend_info.fn +25 -0
- aiohomematic/rega_scripts/get_inbox_devices.fn +61 -0
- aiohomematic/rega_scripts/get_program_descriptions.fn +31 -0
- aiohomematic/rega_scripts/get_serial.fn +44 -0
- aiohomematic/rega_scripts/get_service_messages.fn +83 -0
- aiohomematic/rega_scripts/get_system_update_info.fn +39 -0
- aiohomematic/rega_scripts/get_system_variable_descriptions.fn +31 -0
- aiohomematic/rega_scripts/set_program_state.fn +17 -0
- aiohomematic/rega_scripts/set_system_variable.fn +19 -0
- aiohomematic/rega_scripts/trigger_firmware_update.fn +67 -0
- aiohomematic/schemas.py +256 -0
- aiohomematic/store/__init__.py +55 -0
- aiohomematic/store/dynamic/__init__.py +43 -0
- aiohomematic/store/dynamic/command.py +250 -0
- aiohomematic/store/dynamic/data.py +175 -0
- aiohomematic/store/dynamic/details.py +187 -0
- aiohomematic/store/dynamic/ping_pong.py +416 -0
- aiohomematic/store/persistent/__init__.py +71 -0
- aiohomematic/store/persistent/base.py +285 -0
- aiohomematic/store/persistent/device.py +233 -0
- aiohomematic/store/persistent/incident.py +380 -0
- aiohomematic/store/persistent/paramset.py +241 -0
- aiohomematic/store/persistent/session.py +556 -0
- aiohomematic/store/serialization.py +150 -0
- aiohomematic/store/storage.py +689 -0
- aiohomematic/store/types.py +526 -0
- aiohomematic/store/visibility/__init__.py +40 -0
- aiohomematic/store/visibility/parser.py +141 -0
- aiohomematic/store/visibility/registry.py +722 -0
- aiohomematic/store/visibility/rules.py +307 -0
- aiohomematic/strings.json +237 -0
- aiohomematic/support.py +706 -0
- aiohomematic/tracing.py +236 -0
- aiohomematic/translations/de.json +237 -0
- aiohomematic/translations/en.json +237 -0
- aiohomematic/type_aliases.py +51 -0
- aiohomematic/validator.py +128 -0
- aiohomematic-2026.1.29.dist-info/METADATA +296 -0
- aiohomematic-2026.1.29.dist-info/RECORD +188 -0
- aiohomematic-2026.1.29.dist-info/WHEEL +5 -0
- aiohomematic-2026.1.29.dist-info/entry_points.txt +2 -0
- aiohomematic-2026.1.29.dist-info/licenses/LICENSE +21 -0
- aiohomematic-2026.1.29.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
# Copyright (c) 2021-2026
|
|
3
|
+
"""
|
|
4
|
+
Custom data points for AioHomematic.
|
|
5
|
+
|
|
6
|
+
This subpackage provides higher-level, device-specific data points that combine
|
|
7
|
+
multiple backend parameters into single, meaningful data points (for example: a
|
|
8
|
+
thermostat, a blind with tilt, a fixed-color light, a lock, a siren, a switch,
|
|
9
|
+
or an irrigation valve). It also contains discovery helpers and a schema-based
|
|
10
|
+
validation for model-specific configurations.
|
|
11
|
+
|
|
12
|
+
What this package does
|
|
13
|
+
- Discovery: create_custom_data_points() inspects a device model and, if a
|
|
14
|
+
matching custom definition exists and the device is not ignored for customs,
|
|
15
|
+
creates the appropriate custom data point(s) and attaches them to the device.
|
|
16
|
+
- Definitions: The definition module holds the catalog of supported models and
|
|
17
|
+
the rules that describe which parameters form each custom data point. It exposes
|
|
18
|
+
helpers to query availability, enumerate required parameters, and validate the
|
|
19
|
+
definition schema.
|
|
20
|
+
- Specializations: Rich custom data point classes for climate, light, cover,
|
|
21
|
+
lock, siren, switch, and irrigation valve provide tailored behavior and an API
|
|
22
|
+
focused on user intent (e.g., set_temperature, open_tilt, set_profile,
|
|
23
|
+
turn_on with effect, lock/open, vent, etc.).
|
|
24
|
+
|
|
25
|
+
How it relates to the generic layer
|
|
26
|
+
Custom data points build on top of generic data points. While the generic layer
|
|
27
|
+
maps one backend parameter to one data point, this package groups multiple
|
|
28
|
+
parameters across channels (where needed) into a single higher-level data point. The
|
|
29
|
+
result is a simpler interface for automations and UIs, while still allowing the
|
|
30
|
+
underlying generic data points to be created when desired.
|
|
31
|
+
|
|
32
|
+
Public API entry points commonly used by integrators
|
|
33
|
+
- create_custom_data_points(device): Run discovery and attach custom data points.
|
|
34
|
+
- data_point_definition_exists(model): Check if a custom definition is available.
|
|
35
|
+
- get_required_parameters(): Return all parameters that must be fetched to allow
|
|
36
|
+
custom data points to function properly.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
from __future__ import annotations
|
|
40
|
+
|
|
41
|
+
import logging
|
|
42
|
+
from typing import Final
|
|
43
|
+
|
|
44
|
+
from aiohomematic.const import ServiceScope
|
|
45
|
+
from aiohomematic.decorators import inspector
|
|
46
|
+
from aiohomematic.interfaces.model import DeviceProtocol
|
|
47
|
+
from aiohomematic.model.custom.climate import (
|
|
48
|
+
PROFILE_PREFIX,
|
|
49
|
+
BaseCustomDpClimate,
|
|
50
|
+
ClimateActivity,
|
|
51
|
+
ClimateMode,
|
|
52
|
+
ClimateProfile,
|
|
53
|
+
CustomDpIpThermostat,
|
|
54
|
+
CustomDpRfThermostat,
|
|
55
|
+
CustomDpSimpleRfThermostat,
|
|
56
|
+
)
|
|
57
|
+
from aiohomematic.model.custom.cover import (
|
|
58
|
+
CustomDpBlind,
|
|
59
|
+
CustomDpCover,
|
|
60
|
+
CustomDpGarage,
|
|
61
|
+
CustomDpIpBlind,
|
|
62
|
+
CustomDpWindowDrive,
|
|
63
|
+
)
|
|
64
|
+
from aiohomematic.model.custom.data_point import CustomDataPoint
|
|
65
|
+
from aiohomematic.model.custom.definition import (
|
|
66
|
+
create_custom_data_points as _create_custom_data_points_for_channel,
|
|
67
|
+
data_point_definition_exists,
|
|
68
|
+
get_required_parameters,
|
|
69
|
+
)
|
|
70
|
+
from aiohomematic.model.custom.light import (
|
|
71
|
+
FIXED_COLOR_TO_HS_CONVERTER,
|
|
72
|
+
CustomDpColorDimmer,
|
|
73
|
+
CustomDpColorDimmerEffect,
|
|
74
|
+
CustomDpColorTempDimmer,
|
|
75
|
+
CustomDpDimmer,
|
|
76
|
+
CustomDpIpDrgDaliLight,
|
|
77
|
+
CustomDpIpFixedColorLight,
|
|
78
|
+
CustomDpIpRGBWLight,
|
|
79
|
+
CustomDpSoundPlayerLed,
|
|
80
|
+
LightOffArgs,
|
|
81
|
+
LightOnArgs,
|
|
82
|
+
SoundPlayerLedOnArgs,
|
|
83
|
+
hs_color_to_fixed_converter,
|
|
84
|
+
)
|
|
85
|
+
from aiohomematic.model.custom.lock import (
|
|
86
|
+
BaseCustomDpLock,
|
|
87
|
+
CustomDpButtonLock,
|
|
88
|
+
CustomDpIpLock,
|
|
89
|
+
CustomDpRfLock,
|
|
90
|
+
LockState,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
# New type-safe profile and registry modules
|
|
94
|
+
from aiohomematic.model.custom.profile import (
|
|
95
|
+
DEFAULT_DATA_POINTS,
|
|
96
|
+
PROFILE_CONFIGS,
|
|
97
|
+
ChannelGroupConfig,
|
|
98
|
+
ProfileConfig,
|
|
99
|
+
ProfileRegistry,
|
|
100
|
+
RebasedChannelGroupConfig,
|
|
101
|
+
get_profile_config,
|
|
102
|
+
rebase_channel_group,
|
|
103
|
+
)
|
|
104
|
+
from aiohomematic.model.custom.registry import DeviceConfig, DeviceProfileRegistry, ExtendedDeviceConfig
|
|
105
|
+
from aiohomematic.model.custom.siren import (
|
|
106
|
+
BaseCustomDpSiren,
|
|
107
|
+
CustomDpIpSiren,
|
|
108
|
+
CustomDpIpSirenSmoke,
|
|
109
|
+
CustomDpSoundPlayer,
|
|
110
|
+
PlaySoundArgs,
|
|
111
|
+
SirenOnArgs,
|
|
112
|
+
)
|
|
113
|
+
from aiohomematic.model.custom.switch import CustomDpSwitch
|
|
114
|
+
from aiohomematic.model.custom.text_display import CustomDpTextDisplay, TextDisplayArgs
|
|
115
|
+
from aiohomematic.model.custom.valve import CustomDpIpIrrigationValve
|
|
116
|
+
|
|
117
|
+
__all__ = [
|
|
118
|
+
# Climate
|
|
119
|
+
"BaseCustomDpClimate",
|
|
120
|
+
"ClimateActivity",
|
|
121
|
+
"ClimateMode",
|
|
122
|
+
"ClimateProfile",
|
|
123
|
+
"CustomDpIpThermostat",
|
|
124
|
+
"CustomDpRfThermostat",
|
|
125
|
+
"CustomDpSimpleRfThermostat",
|
|
126
|
+
"PROFILE_PREFIX",
|
|
127
|
+
# Cover
|
|
128
|
+
"CustomDpBlind",
|
|
129
|
+
"CustomDpCover",
|
|
130
|
+
"CustomDpGarage",
|
|
131
|
+
"CustomDpIpBlind",
|
|
132
|
+
"CustomDpWindowDrive",
|
|
133
|
+
# Data point
|
|
134
|
+
"CustomDataPoint",
|
|
135
|
+
# Definition
|
|
136
|
+
"create_custom_data_points",
|
|
137
|
+
"data_point_definition_exists",
|
|
138
|
+
"get_required_parameters",
|
|
139
|
+
# Light
|
|
140
|
+
"CustomDpColorDimmer",
|
|
141
|
+
"CustomDpColorDimmerEffect",
|
|
142
|
+
"CustomDpColorTempDimmer",
|
|
143
|
+
"CustomDpDimmer",
|
|
144
|
+
"CustomDpIpDrgDaliLight",
|
|
145
|
+
"CustomDpIpFixedColorLight",
|
|
146
|
+
"CustomDpIpRGBWLight",
|
|
147
|
+
"FIXED_COLOR_TO_HS_CONVERTER",
|
|
148
|
+
"LightOffArgs",
|
|
149
|
+
"LightOnArgs",
|
|
150
|
+
"hs_color_to_fixed_converter",
|
|
151
|
+
# Lock
|
|
152
|
+
"BaseCustomDpLock",
|
|
153
|
+
"CustomDpButtonLock",
|
|
154
|
+
"CustomDpIpLock",
|
|
155
|
+
"CustomDpRfLock",
|
|
156
|
+
"LockState",
|
|
157
|
+
# Profile
|
|
158
|
+
"ChannelGroupConfig",
|
|
159
|
+
"DEFAULT_DATA_POINTS",
|
|
160
|
+
"PROFILE_CONFIGS",
|
|
161
|
+
"ProfileConfig",
|
|
162
|
+
"ProfileRegistry",
|
|
163
|
+
"RebasedChannelGroupConfig",
|
|
164
|
+
"get_profile_config",
|
|
165
|
+
"rebase_channel_group",
|
|
166
|
+
# Registry
|
|
167
|
+
"DeviceConfig",
|
|
168
|
+
"DeviceProfileRegistry",
|
|
169
|
+
"ExtendedDeviceConfig",
|
|
170
|
+
# Siren
|
|
171
|
+
"BaseCustomDpSiren",
|
|
172
|
+
"CustomDpIpSiren",
|
|
173
|
+
"CustomDpIpSirenSmoke",
|
|
174
|
+
"SirenOnArgs",
|
|
175
|
+
# Sound player
|
|
176
|
+
"CustomDpSoundPlayer",
|
|
177
|
+
"CustomDpSoundPlayerLed",
|
|
178
|
+
"PlaySoundArgs",
|
|
179
|
+
"SoundPlayerLedOnArgs",
|
|
180
|
+
# Switch
|
|
181
|
+
"CustomDpSwitch",
|
|
182
|
+
# Text display
|
|
183
|
+
"CustomDpTextDisplay",
|
|
184
|
+
"TextDisplayArgs",
|
|
185
|
+
# Valve
|
|
186
|
+
"CustomDpIpIrrigationValve",
|
|
187
|
+
]
|
|
188
|
+
|
|
189
|
+
_LOGGER: Final = logging.getLogger(__name__)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
@inspector(scope=ServiceScope.INTERNAL)
|
|
193
|
+
def create_custom_data_points(*, device: DeviceProtocol) -> None:
|
|
194
|
+
"""Decide which data point category should be used, and create the required data points."""
|
|
195
|
+
if device.ignore_for_custom_data_point:
|
|
196
|
+
_LOGGER.debug(
|
|
197
|
+
"CREATE_CUSTOM_DATA_POINTS: Ignoring for custom data point: %s, %s, %s due to ignored",
|
|
198
|
+
device.interface_id,
|
|
199
|
+
device,
|
|
200
|
+
device.model,
|
|
201
|
+
)
|
|
202
|
+
return
|
|
203
|
+
|
|
204
|
+
if data_point_definition_exists(model=device.model):
|
|
205
|
+
_LOGGER.debug(
|
|
206
|
+
"CREATE_CUSTOM_DATA_POINTS: Handling custom data point integration: %s, %s, %s",
|
|
207
|
+
device.interface_id,
|
|
208
|
+
device,
|
|
209
|
+
device.model,
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
# Create custom data points for each channel
|
|
213
|
+
for channel in device.channels.values():
|
|
214
|
+
_create_custom_data_points_for_channel(channel=channel)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
# Copyright (c) 2021-2026
|
|
3
|
+
"""
|
|
4
|
+
Entity capabilities dataclasses.
|
|
5
|
+
|
|
6
|
+
Provides frozen dataclasses for static capability flags of custom entities.
|
|
7
|
+
Dynamic capabilities that change at runtime use has_* properties on the entity class.
|
|
8
|
+
|
|
9
|
+
Public API
|
|
10
|
+
----------
|
|
11
|
+
- LightCapabilities: Capability flags for light entities
|
|
12
|
+
- SirenCapabilities: Capability flags for siren entities
|
|
13
|
+
- LockCapabilities: Capability flags for lock entities
|
|
14
|
+
- ClimateCapabilities: Capability flags for climate entities
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from __future__ import annotations
|
|
18
|
+
|
|
19
|
+
from aiohomematic.model.custom.capabilities.climate import (
|
|
20
|
+
BASIC_CLIMATE_CAPABILITIES,
|
|
21
|
+
IP_THERMOSTAT_CAPABILITIES,
|
|
22
|
+
ClimateCapabilities,
|
|
23
|
+
)
|
|
24
|
+
from aiohomematic.model.custom.capabilities.light import (
|
|
25
|
+
COLOR_DIMMER_CAPABILITIES,
|
|
26
|
+
COLOR_TEMP_DIMMER_CAPABILITIES,
|
|
27
|
+
DIMMER_CAPABILITIES,
|
|
28
|
+
FIXED_COLOR_LIGHT_CAPABILITIES,
|
|
29
|
+
RGBW_LIGHT_CAPABILITIES,
|
|
30
|
+
LightCapabilities,
|
|
31
|
+
)
|
|
32
|
+
from aiohomematic.model.custom.capabilities.lock import (
|
|
33
|
+
BUTTON_LOCK_CAPABILITIES,
|
|
34
|
+
IP_LOCK_CAPABILITIES,
|
|
35
|
+
SMART_DOOR_LOCK_CAPABILITIES,
|
|
36
|
+
LockCapabilities,
|
|
37
|
+
)
|
|
38
|
+
from aiohomematic.model.custom.capabilities.siren import (
|
|
39
|
+
BASIC_SIREN_CAPABILITIES,
|
|
40
|
+
SMOKE_SENSOR_SIREN_CAPABILITIES,
|
|
41
|
+
SOUND_PLAYER_CAPABILITIES,
|
|
42
|
+
SirenCapabilities,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
__all__ = [
|
|
46
|
+
# Light
|
|
47
|
+
"COLOR_DIMMER_CAPABILITIES",
|
|
48
|
+
"COLOR_TEMP_DIMMER_CAPABILITIES",
|
|
49
|
+
"DIMMER_CAPABILITIES",
|
|
50
|
+
"FIXED_COLOR_LIGHT_CAPABILITIES",
|
|
51
|
+
"LightCapabilities",
|
|
52
|
+
"RGBW_LIGHT_CAPABILITIES",
|
|
53
|
+
# Siren
|
|
54
|
+
"BASIC_SIREN_CAPABILITIES",
|
|
55
|
+
"SMOKE_SENSOR_SIREN_CAPABILITIES",
|
|
56
|
+
"SOUND_PLAYER_CAPABILITIES",
|
|
57
|
+
"SirenCapabilities",
|
|
58
|
+
# Lock
|
|
59
|
+
"BUTTON_LOCK_CAPABILITIES",
|
|
60
|
+
"IP_LOCK_CAPABILITIES",
|
|
61
|
+
"LockCapabilities",
|
|
62
|
+
"SMART_DOOR_LOCK_CAPABILITIES",
|
|
63
|
+
# Climate
|
|
64
|
+
"BASIC_CLIMATE_CAPABILITIES",
|
|
65
|
+
"ClimateCapabilities",
|
|
66
|
+
"IP_THERMOSTAT_CAPABILITIES",
|
|
67
|
+
]
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
# Copyright (c) 2021-2026
|
|
3
|
+
"""
|
|
4
|
+
Climate capabilities dataclass.
|
|
5
|
+
|
|
6
|
+
Contains static capability flags for climate entities.
|
|
7
|
+
|
|
8
|
+
Public API
|
|
9
|
+
----------
|
|
10
|
+
- ClimateCapabilities: Frozen dataclass with climate capability flags
|
|
11
|
+
- BASIC_CLIMATE_CAPABILITIES: Basic climate capabilities
|
|
12
|
+
- IP_THERMOSTAT_CAPABILITIES: IP thermostat capabilities
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
from dataclasses import dataclass
|
|
18
|
+
from typing import Final
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"BASIC_CLIMATE_CAPABILITIES",
|
|
22
|
+
"ClimateCapabilities",
|
|
23
|
+
"IP_THERMOSTAT_CAPABILITIES",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@dataclass(frozen=True, slots=True)
|
|
28
|
+
class ClimateCapabilities:
|
|
29
|
+
"""
|
|
30
|
+
Immutable capability flags for climate entities.
|
|
31
|
+
|
|
32
|
+
All capabilities are static and determined by device type.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
profiles: bool = False # Supports heating profiles/schedules
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# Predefined capability sets for different climate device types
|
|
39
|
+
|
|
40
|
+
BASIC_CLIMATE_CAPABILITIES: Final = ClimateCapabilities(profiles=False)
|
|
41
|
+
IP_THERMOSTAT_CAPABILITIES: Final = ClimateCapabilities(profiles=True)
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
# Copyright (c) 2021-2026
|
|
3
|
+
"""
|
|
4
|
+
Light capabilities dataclass.
|
|
5
|
+
|
|
6
|
+
Contains static capability flags for light entities. Dynamic capabilities
|
|
7
|
+
that depend on runtime state (like device_operation_mode) use has_* properties
|
|
8
|
+
on the entity class instead.
|
|
9
|
+
|
|
10
|
+
Public API
|
|
11
|
+
----------
|
|
12
|
+
- LightCapabilities: Frozen dataclass with light capability flags
|
|
13
|
+
- DIMMER_CAPABILITIES: Basic dimmer capabilities
|
|
14
|
+
- COLOR_DIMMER_CAPABILITIES: Color dimmer capabilities
|
|
15
|
+
- COLOR_TEMP_DIMMER_CAPABILITIES: Color temperature dimmer capabilities
|
|
16
|
+
- FIXED_COLOR_LIGHT_CAPABILITIES: Fixed color light capabilities
|
|
17
|
+
- RGBW_LIGHT_CAPABILITIES: RGBW light capabilities (dynamic features via has_*)
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
from dataclasses import dataclass
|
|
23
|
+
from typing import Final
|
|
24
|
+
|
|
25
|
+
__all__ = [
|
|
26
|
+
"COLOR_DIMMER_CAPABILITIES",
|
|
27
|
+
"COLOR_TEMP_DIMMER_CAPABILITIES",
|
|
28
|
+
"DIMMER_CAPABILITIES",
|
|
29
|
+
"FIXED_COLOR_LIGHT_CAPABILITIES",
|
|
30
|
+
"LightCapabilities",
|
|
31
|
+
"RGBW_LIGHT_CAPABILITIES",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@dataclass(frozen=True, slots=True)
|
|
36
|
+
class LightCapabilities:
|
|
37
|
+
"""
|
|
38
|
+
Immutable capability flags for light entities.
|
|
39
|
+
|
|
40
|
+
Contains ONLY static capabilities that don't change at runtime.
|
|
41
|
+
For CustomDpIpRGBWLight, color_temperature/hs_color/effects depend on
|
|
42
|
+
device_operation_mode and use has_* properties instead.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
# Core features
|
|
46
|
+
brightness: bool = True # All lights support brightness by default
|
|
47
|
+
transition: bool = False # Ramp time support
|
|
48
|
+
|
|
49
|
+
# Color features (static detection based on DataPoint presence)
|
|
50
|
+
color_temperature: bool = False # Has color temperature DataPoint
|
|
51
|
+
hs_color: bool = False # Has hue/saturation DataPoints
|
|
52
|
+
effects: bool = False # Has effect DataPoint
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
# Predefined capability sets for different light types
|
|
56
|
+
|
|
57
|
+
DIMMER_CAPABILITIES: Final = LightCapabilities(
|
|
58
|
+
brightness=True,
|
|
59
|
+
transition=True,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
COLOR_DIMMER_CAPABILITIES: Final = LightCapabilities(
|
|
63
|
+
brightness=True,
|
|
64
|
+
transition=True,
|
|
65
|
+
hs_color=True,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
COLOR_TEMP_DIMMER_CAPABILITIES: Final = LightCapabilities(
|
|
69
|
+
brightness=True,
|
|
70
|
+
transition=True,
|
|
71
|
+
color_temperature=True,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
FIXED_COLOR_LIGHT_CAPABILITIES: Final = LightCapabilities(
|
|
75
|
+
brightness=True,
|
|
76
|
+
transition=True,
|
|
77
|
+
# Fixed color uses color property but not hs_color
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
# RGBW lights have dynamic capabilities based on device_operation_mode
|
|
81
|
+
# Static capabilities only include brightness/transition
|
|
82
|
+
# Color features are checked via has_* properties at runtime
|
|
83
|
+
RGBW_LIGHT_CAPABILITIES: Final = LightCapabilities(
|
|
84
|
+
brightness=True,
|
|
85
|
+
transition=True,
|
|
86
|
+
# color_temperature, hs_color, effects are dynamic - use has_* properties
|
|
87
|
+
)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
# Copyright (c) 2021-2026
|
|
3
|
+
"""
|
|
4
|
+
Lock capabilities dataclass.
|
|
5
|
+
|
|
6
|
+
Contains static capability flags for lock entities.
|
|
7
|
+
|
|
8
|
+
Public API
|
|
9
|
+
----------
|
|
10
|
+
- LockCapabilities: Frozen dataclass with lock capability flags
|
|
11
|
+
- IP_LOCK_CAPABILITIES: IP lock capabilities
|
|
12
|
+
- BUTTON_LOCK_CAPABILITIES: Button lock capabilities
|
|
13
|
+
- SMART_DOOR_LOCK_CAPABILITIES: Smart door lock capabilities
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
from dataclasses import dataclass
|
|
19
|
+
from typing import Final
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"BUTTON_LOCK_CAPABILITIES",
|
|
23
|
+
"IP_LOCK_CAPABILITIES",
|
|
24
|
+
"LockCapabilities",
|
|
25
|
+
"SMART_DOOR_LOCK_CAPABILITIES",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass(frozen=True, slots=True)
|
|
30
|
+
class LockCapabilities:
|
|
31
|
+
"""
|
|
32
|
+
Immutable capability flags for lock entities.
|
|
33
|
+
|
|
34
|
+
All capabilities are static and determined by device type.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
open: bool = False # Can be opened (not just locked/unlocked)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# Predefined capability sets for different lock types
|
|
41
|
+
|
|
42
|
+
IP_LOCK_CAPABILITIES: Final = LockCapabilities(open=True)
|
|
43
|
+
BUTTON_LOCK_CAPABILITIES: Final = LockCapabilities(open=False)
|
|
44
|
+
SMART_DOOR_LOCK_CAPABILITIES: Final = LockCapabilities(open=True)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
# Copyright (c) 2021-2026
|
|
3
|
+
"""
|
|
4
|
+
Siren capabilities dataclass.
|
|
5
|
+
|
|
6
|
+
Contains static capability flags for siren entities.
|
|
7
|
+
|
|
8
|
+
Public API
|
|
9
|
+
----------
|
|
10
|
+
- SirenCapabilities: Frozen dataclass with siren capability flags
|
|
11
|
+
- BASIC_SIREN_CAPABILITIES: Standard siren capabilities
|
|
12
|
+
- SMOKE_SENSOR_SIREN_CAPABILITIES: Smoke sensor siren capabilities
|
|
13
|
+
- SOUND_PLAYER_CAPABILITIES: Sound player capabilities
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
from dataclasses import dataclass
|
|
19
|
+
from typing import Final
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"BASIC_SIREN_CAPABILITIES",
|
|
23
|
+
"SMOKE_SENSOR_SIREN_CAPABILITIES",
|
|
24
|
+
"SOUND_PLAYER_CAPABILITIES",
|
|
25
|
+
"SirenCapabilities",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass(frozen=True, slots=True)
|
|
30
|
+
class SirenCapabilities:
|
|
31
|
+
"""
|
|
32
|
+
Immutable capability flags for siren entities.
|
|
33
|
+
|
|
34
|
+
All capabilities are static and determined at initialization
|
|
35
|
+
based on device type and available DataPoints.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
duration: bool = False # Supports duration parameter for alarm
|
|
39
|
+
lights: bool = False # Has optical alarm selection DataPoint
|
|
40
|
+
tones: bool = False # Has acoustic alarm selection DataPoint
|
|
41
|
+
soundfiles: bool = False # Has soundfile selection DataPoint (sound players)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
# Predefined capability sets for different siren types
|
|
45
|
+
|
|
46
|
+
BASIC_SIREN_CAPABILITIES: Final = SirenCapabilities(
|
|
47
|
+
duration=True,
|
|
48
|
+
lights=True,
|
|
49
|
+
tones=True,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
SMOKE_SENSOR_SIREN_CAPABILITIES: Final = SirenCapabilities(
|
|
53
|
+
duration=False,
|
|
54
|
+
lights=False,
|
|
55
|
+
tones=True,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
SOUND_PLAYER_CAPABILITIES: Final = SirenCapabilities(
|
|
59
|
+
duration=True,
|
|
60
|
+
lights=False,
|
|
61
|
+
tones=False,
|
|
62
|
+
soundfiles=True,
|
|
63
|
+
)
|