aiohomematic-test-support 2025.12.19__tar.gz → 2025.12.26__tar.gz
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_test_support-2025.12.19/aiohomematic_test_support.egg-info → aiohomematic_test_support-2025.12.26}/PKG-INFO +1 -1
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/__init__.py +2 -2
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26/aiohomematic_test_support.egg-info}/PKG-INFO +1 -1
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/factory.py +40 -14
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/mock.py +10 -7
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/MANIFEST.in +0 -0
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/README.md +0 -0
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/aiohomematic_test_support.egg-info/SOURCES.txt +0 -0
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/aiohomematic_test_support.egg-info/dependency_links.txt +0 -0
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/aiohomematic_test_support.egg-info/top_level.txt +0 -0
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/const.py +0 -0
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/data/full_session_randomized_ccu.zip +0 -0
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/data/full_session_randomized_pydevccu.zip +0 -0
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/helper.py +0 -0
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/py.typed +0 -0
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/pyproject.toml +0 -0
- {aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aiohomematic-test-support
|
|
3
|
-
Version: 2025.12.
|
|
3
|
+
Version: 2025.12.26
|
|
4
4
|
Summary: Support-only package for AioHomematic (tests/dev). Not part of production builds.
|
|
5
5
|
Author-email: SukramJ <sukramj@icloud.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/SukramJ/aiohomematic
|
|
@@ -30,7 +30,7 @@ Using the factory to create a test central with session playback:
|
|
|
30
30
|
|
|
31
31
|
# Test operations
|
|
32
32
|
await central.start()
|
|
33
|
-
device = central.get_device_by_address("VCU0000001")
|
|
33
|
+
device = central.device_coordinator.get_device_by_address("VCU0000001")
|
|
34
34
|
await central.stop()
|
|
35
35
|
|
|
36
36
|
The session player replays pre-recorded backend responses, enabling fast and
|
|
@@ -45,4 +45,4 @@ test dependencies to access test support functionality.
|
|
|
45
45
|
|
|
46
46
|
from __future__ import annotations
|
|
47
47
|
|
|
48
|
-
__version__ = "2025.12.
|
|
48
|
+
__version__ = "2025.12.26"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aiohomematic-test-support
|
|
3
|
-
Version: 2025.12.
|
|
3
|
+
Version: 2025.12.26
|
|
4
4
|
Summary: Support-only package for AioHomematic (tests/dev). Not part of production builds.
|
|
5
5
|
Author-email: SukramJ <sukramj@icloud.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/SukramJ/aiohomematic
|
|
@@ -41,9 +41,15 @@ from unittest.mock import MagicMock, Mock, patch
|
|
|
41
41
|
from aiohttp import ClientSession
|
|
42
42
|
|
|
43
43
|
from aiohomematic.central import CentralConfig, CentralUnit
|
|
44
|
-
from aiohomematic.central.
|
|
44
|
+
from aiohomematic.central.integration_events import (
|
|
45
|
+
DataPointsCreatedEvent,
|
|
46
|
+
DeviceLifecycleEvent,
|
|
47
|
+
DeviceLifecycleEventType,
|
|
48
|
+
DeviceTriggerEvent,
|
|
49
|
+
SystemStatusEvent,
|
|
50
|
+
)
|
|
45
51
|
from aiohomematic.client import ClientConfig, InterfaceConfig
|
|
46
|
-
from aiohomematic.const import LOCAL_HOST,
|
|
52
|
+
from aiohomematic.const import LOCAL_HOST, Interface, OptionalSettings
|
|
47
53
|
from aiohomematic.interfaces.client import ClientProtocol
|
|
48
54
|
from aiohomematic_test_support import const
|
|
49
55
|
from aiohomematic_test_support.mock import SessionPlayer, get_client_session, get_mock, get_xml_rpc_proxy
|
|
@@ -138,21 +144,41 @@ class FactoryWithClient:
|
|
|
138
144
|
).create_central()
|
|
139
145
|
|
|
140
146
|
# Subscribe to events via event bus
|
|
141
|
-
def
|
|
142
|
-
"""Handle
|
|
147
|
+
def _device_lifecycle_event_handler(event: DeviceLifecycleEvent) -> None:
|
|
148
|
+
"""Handle device lifecycle events."""
|
|
143
149
|
self.system_event_mock(event)
|
|
144
150
|
|
|
145
|
-
def
|
|
146
|
-
"""Handle
|
|
151
|
+
def _data_points_created_event_handler(event: DataPointsCreatedEvent) -> None:
|
|
152
|
+
"""Handle data points created events."""
|
|
153
|
+
self.system_event_mock(event)
|
|
154
|
+
|
|
155
|
+
def _device_trigger_event_handler(event: DeviceTriggerEvent) -> None:
|
|
156
|
+
"""Handle device trigger events."""
|
|
157
|
+
self.ha_event_mock(event)
|
|
158
|
+
|
|
159
|
+
def _system_status_event_handler(event: SystemStatusEvent) -> None:
|
|
160
|
+
"""Handle system status events (issues, state changes)."""
|
|
147
161
|
self.ha_event_mock(event)
|
|
148
162
|
|
|
149
163
|
self._event_bus_unsubscribe_callbacks.append(
|
|
150
164
|
central.event_bus.subscribe(
|
|
151
|
-
event_type=
|
|
165
|
+
event_type=DeviceLifecycleEvent, event_key=None, handler=_device_lifecycle_event_handler
|
|
166
|
+
)
|
|
167
|
+
)
|
|
168
|
+
self._event_bus_unsubscribe_callbacks.append(
|
|
169
|
+
central.event_bus.subscribe(
|
|
170
|
+
event_type=DataPointsCreatedEvent, event_key=None, handler=_data_points_created_event_handler
|
|
152
171
|
)
|
|
153
172
|
)
|
|
154
173
|
self._event_bus_unsubscribe_callbacks.append(
|
|
155
|
-
central.event_bus.subscribe(
|
|
174
|
+
central.event_bus.subscribe(
|
|
175
|
+
event_type=DeviceTriggerEvent, event_key=None, handler=_device_trigger_event_handler
|
|
176
|
+
)
|
|
177
|
+
)
|
|
178
|
+
self._event_bus_unsubscribe_callbacks.append(
|
|
179
|
+
central.event_bus.subscribe(
|
|
180
|
+
event_type=SystemStatusEvent, event_key=None, handler=_system_status_event_handler
|
|
181
|
+
)
|
|
156
182
|
)
|
|
157
183
|
|
|
158
184
|
assert central
|
|
@@ -223,14 +249,14 @@ async def get_central_client_factory(
|
|
|
223
249
|
un_ignore_list=un_ignore_list,
|
|
224
250
|
)
|
|
225
251
|
central = await factory.get_default_central()
|
|
226
|
-
client = central.primary_client
|
|
252
|
+
client = central.client_coordinator.primary_client
|
|
227
253
|
assert client
|
|
228
254
|
try:
|
|
229
255
|
yield central, client, factory
|
|
230
256
|
finally:
|
|
231
257
|
factory.cleanup_event_bus_subscriptions()
|
|
232
258
|
await central.stop()
|
|
233
|
-
await central.
|
|
259
|
+
await central.cache_coordinator.clear_all()
|
|
234
260
|
|
|
235
261
|
|
|
236
262
|
async def get_pydev_ccu_central_unit_full(
|
|
@@ -241,9 +267,9 @@ async def get_pydev_ccu_central_unit_full(
|
|
|
241
267
|
"""Create and yield central, after all devices have been created."""
|
|
242
268
|
device_event = asyncio.Event()
|
|
243
269
|
|
|
244
|
-
def
|
|
245
|
-
"""Handle
|
|
246
|
-
if event.
|
|
270
|
+
def device_lifecycle_event_handler(event: DeviceLifecycleEvent) -> None:
|
|
271
|
+
"""Handle device lifecycle events."""
|
|
272
|
+
if event.event_type == DeviceLifecycleEventType.CREATED:
|
|
247
273
|
device_event.set()
|
|
248
274
|
|
|
249
275
|
interface_configs = {
|
|
@@ -265,7 +291,7 @@ async def get_pydev_ccu_central_unit_full(
|
|
|
265
291
|
program_markers=(),
|
|
266
292
|
sysvar_markers=(),
|
|
267
293
|
).create_central()
|
|
268
|
-
central.event_bus.subscribe(event_type=
|
|
294
|
+
central.event_bus.subscribe(event_type=DeviceLifecycleEvent, event_key=None, handler=device_lifecycle_event_handler)
|
|
269
295
|
await central.start()
|
|
270
296
|
|
|
271
297
|
# Wait up to 60 seconds for the DEVICES_CREATED event which signals that all devices are available
|
|
@@ -186,7 +186,7 @@ def get_client_session( # noqa: C901
|
|
|
186
186
|
)
|
|
187
187
|
|
|
188
188
|
if method == _JsonRpcMethod.INTERFACE_SET_VALUE:
|
|
189
|
-
await self._central.data_point_event(
|
|
189
|
+
await self._central.event_coordinator.data_point_event(
|
|
190
190
|
interface_id=params[_JsonKey.INTERFACE],
|
|
191
191
|
channel_address=params[_JsonKey.ADDRESS],
|
|
192
192
|
parameter=params[_JsonKey.VALUE_KEY],
|
|
@@ -199,7 +199,7 @@ def get_client_session( # noqa: C901
|
|
|
199
199
|
channel_address = params[_JsonKey.ADDRESS]
|
|
200
200
|
values = params[_JsonKey.SET]
|
|
201
201
|
for param, value in values.items():
|
|
202
|
-
await self._central.data_point_event(
|
|
202
|
+
await self._central.event_coordinator.data_point_event(
|
|
203
203
|
interface_id=interface_id,
|
|
204
204
|
channel_address=channel_address,
|
|
205
205
|
parameter=param,
|
|
@@ -279,6 +279,9 @@ def get_xml_rpc_proxy( # noqa: C901
|
|
|
279
279
|
"""Return the supported methods."""
|
|
280
280
|
return self._supported_methods
|
|
281
281
|
|
|
282
|
+
def clear_connection_issue(self) -> None:
|
|
283
|
+
"""Clear connection issue (no-op for test mock)."""
|
|
284
|
+
|
|
282
285
|
async def clientServerInitialized(self, interface_id: str) -> None:
|
|
283
286
|
"""Answer clientServerInitialized with pong."""
|
|
284
287
|
await self.ping(callerId=interface_id)
|
|
@@ -332,7 +335,7 @@ def get_xml_rpc_proxy( # noqa: C901
|
|
|
332
335
|
async def ping(self, callerId: str) -> None:
|
|
333
336
|
"""Answer ping with pong."""
|
|
334
337
|
if self._central:
|
|
335
|
-
await self._central.data_point_event(
|
|
338
|
+
await self._central.event_coordinator.data_point_event(
|
|
336
339
|
interface_id=callerId,
|
|
337
340
|
channel_address="",
|
|
338
341
|
parameter=Parameter.PONG,
|
|
@@ -344,17 +347,17 @@ def get_xml_rpc_proxy( # noqa: C901
|
|
|
344
347
|
) -> None:
|
|
345
348
|
"""Set a paramset."""
|
|
346
349
|
if self._central and paramset_key == ParamsetKey.VALUES:
|
|
347
|
-
interface_id = self._central.primary_client.interface_id # type: ignore[union-attr]
|
|
350
|
+
interface_id = self._central.client_coordinator.primary_client.interface_id # type: ignore[union-attr]
|
|
348
351
|
for param, value in values.items():
|
|
349
|
-
await self._central.data_point_event(
|
|
352
|
+
await self._central.event_coordinator.data_point_event(
|
|
350
353
|
interface_id=interface_id, channel_address=channel_address, parameter=param, value=value
|
|
351
354
|
)
|
|
352
355
|
|
|
353
356
|
async def setValue(self, channel_address: str, parameter: str, value: Any, rx_mode: Any | None = None) -> None:
|
|
354
357
|
"""Set a value."""
|
|
355
358
|
if self._central:
|
|
356
|
-
await self._central.data_point_event(
|
|
357
|
-
interface_id=self._central.primary_client.interface_id, # type: ignore[union-attr]
|
|
359
|
+
await self._central.event_coordinator.data_point_event(
|
|
360
|
+
interface_id=self._central.client_coordinator.primary_client.interface_id, # type: ignore[union-attr]
|
|
358
361
|
channel_address=channel_address,
|
|
359
362
|
parameter=parameter,
|
|
360
363
|
value=value,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aiohomematic_test_support-2025.12.19 → aiohomematic_test_support-2025.12.26}/pyproject.toml
RENAMED
|
File without changes
|
|
File without changes
|