Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
4e15e88
Track bind and reporting state in diagnostics JSON
puddly May 17, 2026
43a6819
Drop cluster handlers from diagnostics JSON
puddly May 17, 2026
ce48239
Regenerate diagnostics
puddly May 17, 2026
d82c83e
Account for cross-platform device type unique ID logic from old disco…
puddly Feb 5, 2026
e17e904
Avoid boosting entirely
puddly Feb 6, 2026
389162c
WIP: Test provisional config format for matching clusters
puddly Feb 6, 2026
d39cae6
Fix async tests for 3.14
puddly Feb 6, 2026
e118889
Migrate simple platforms
puddly Feb 6, 2026
c3290c2
WIP: Commit missing `cluster_config.py`
puddly Feb 17, 2026
56877d4
WIP
puddly May 12, 2026
849c4ec
WIP: next pass of migrations
puddly May 12, 2026
af87e53
WIP: final pass
puddly May 12, 2026
4ad5497
WIP: more...
puddly May 12, 2026
958dac1
WIP
puddly May 12, 2026
db3b9a9
WIP: Bug-for-bug compatibility
puddly May 12, 2026
8541076
WIP: virtual entities to replace cluster handlers
puddly May 17, 2026
a33d3cd
Virtual entities, pass 2
puddly May 12, 2026
073f216
WIP: commit virtual entities
puddly May 12, 2026
582d6bc
Move more cluster handlers
puddly May 12, 2026
69a486f
WIP: move async_update
puddly May 12, 2026
c33fe89
WIP
puddly May 16, 2026
3bdaffb
WIP
puddly May 16, 2026
4512abc
WIP: emit events and account for all regressions
puddly May 16, 2026
a3daa4a
WIP: Begin migrating
puddly May 16, 2026
4536dcf
WIP: finish migration?
puddly May 16, 2026
57d620a
WIP: fixes post migration
puddly May 16, 2026
58670a7
WIP: Clean up
puddly May 16, 2026
6c5d80e
WIP: get tests passing?
puddly May 17, 2026
c811356
WIP: Begin stripping cluster handler references
puddly May 17, 2026
02eacd7
WIP: finish stripping cluster handlers
puddly May 17, 2026
2ebfb53
WIP: Final renames
puddly May 17, 2026
2feb91b
WIP: Maintain naming of `MeasurementType` extra state attribute
puddly May 17, 2026
2f01997
WIP: re-add profile filtering for ZCL entity discovery
puddly May 17, 2026
6025b9d
Remove unnecessary duplicate sensor
puddly May 17, 2026
5c617d2
Clean up naming for legacy event forwarding
puddly May 17, 2026
27222c0
Clean up unique ID computation
puddly May 17, 2026
dd95c1f
Fix all diagnostics regeneration differences
puddly May 17, 2026
9e84dc5
Don't hammer the filesystem when regenerating diagnostics
puddly May 17, 2026
17a4f88
All tests pass
puddly May 17, 2026
f197fbd
Fix pre-commit
puddly May 17, 2026
4caba41
Clean up
puddly May 17, 2026
2cf6266
Rename unknown to virtual
puddly May 17, 2026
6bf2d77
Clean up constants
puddly May 17, 2026
8e857dc
Reduce indirect inheritance for `PolledElectricalMeasurement`
puddly May 18, 2026
635d3a2
WIP: Explicitly propagate all attribute config into EM entities
puddly May 18, 2026
9e5f9a2
WIP: Propagate `measurement_type` as well...
puddly May 18, 2026
aea397e
WIP: Explicit overrides per EM entity
puddly May 18, 2026
92717fb
WIP: propagate other attributes up to subclasses
puddly May 18, 2026
ed75cc0
Move polling into an opt-in mixin
puddly May 18, 2026
5d105f5
Use a virtual entity to drive EM polling
puddly May 18, 2026
589a3ee
Migrate EM as well
puddly May 18, 2026
23701c0
Clean up comment
puddly May 18, 2026
4d347cb
Fix tests
puddly May 18, 2026
145de76
Do not poll attributes without reporting config
puddly May 18, 2026
2741c61
Regenerate diagnostics after class renames
puddly May 18, 2026
aef7bb6
Re-add separate handler for devices that can report EM attributes
puddly May 18, 2026
33d585e
Add missing exposed feature quirk for `SE_POLL_SUMMATION`
puddly May 19, 2026
63b8ad3
Refactor siren select entities to avoid `cluster_runtime_state` hack
puddly May 19, 2026
bf9a4f8
Drop `_virtual`
puddly May 19, 2026
a546575
Clean up
puddly May 19, 2026
21b3755
Revert diagnostics changes to shrink diff
puddly May 19, 2026
a15952d
Regenerate
puddly May 19, 2026
1362c4f
Merge branch 'dev' into puddly/drop-cluster-handlers
puddly May 19, 2026
93b39e8
Regenerate
puddly May 19, 2026
84710da
Migrate extra siren features directly to the siren entities
puddly May 21, 2026
9e0bb56
Clean up window covering entity config
puddly May 21, 2026
de9f7ca
Split up Danfoss thermostat entity config
puddly May 21, 2026
5a514a5
Fix broken arg/param generation for remotes
puddly May 25, 2026
c6f90fd
Clean up typing
puddly May 25, 2026
157da1f
Defer to zigpy for computing manufacturer codes
puddly May 25, 2026
29bd2d5
Add an explicit test for normal remote events
puddly May 25, 2026
8f63218
Pre-commit
puddly May 25, 2026
1feebc6
Explicitly test `skip_configuration`
puddly May 26, 2026
b82a83c
Leave retrying to zigpy
puddly May 26, 2026
036fea4
Drop unnecessary feature groups preventing entity creation
puddly May 26, 2026
9e6580f
Address tiny listener leak in virtual entity
puddly May 27, 2026
58c8fdc
Merge branch 'dev' into puddly/drop-cluster-handlers
puddly May 27, 2026
6243adf
Remove nondeterminism in `_pick_primary_cluster`
puddly May 27, 2026
bf9f24c
Revert unnecessary attribute read chunking
puddly May 27, 2026
fdab3ef
Remove unnecessary guard in `BinarySensor.is_on`
puddly May 27, 2026
9d05dfa
Remove unused pylint ignores
puddly May 27, 2026
f841e8a
Catch `profile_ids` including profiles not in `profile_device_types`
puddly May 27, 2026
b3345cc
Use old-style unique IDs for events
puddly May 27, 2026
d1a4003
Fix event order for `OnOffClientCacheSync`
puddly May 27, 2026
fd5fd0a
Rename `attribute_updated` to `handle_attribute_updated`
puddly May 27, 2026
7b9b08d
Use `write_attributes_safe` in `IasZoneEnrollment`
puddly May 27, 2026
0e8c77d
Fix quirks v2 entities not propagating `change_entity_metadata` in so…
puddly May 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ asyncio_default_fixture_loop_scope = "function"
target-version = "py312"

[tool.ruff.lint]
ignore-init-module-imports = false
select = [
"B002", # Python does not support the unary prefix increment
"B007", # Loop control variable {name} not used within loop body
Expand Down
33 changes: 2 additions & 31 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"""Test configuration for the ZHA component."""

import asyncio
from collections.abc import Callable, Generator
from collections.abc import Generator
from contextlib import contextmanager
import logging
import os
import reprlib
import threading
from types import TracebackType
from unittest.mock import AsyncMock, MagicMock, patch
from unittest.mock import patch

import looptime
import pytest
Expand Down Expand Up @@ -340,17 +340,6 @@ async def zha_gateway(
yield gateway


@pytest.fixture(scope="session", autouse=True)
def disable_request_retry_delay():
"""Disable ZHA request retrying delay to speed up failures."""

with patch(
"zha.zigbee.cluster_handlers.RETRYABLE_REQUEST_DECORATOR",
zigpy.util.retryable_request(tries=3, delay=0),
):
yield


@pytest.fixture(scope="session", autouse=True)
def globally_load_quirks():
"""Load quirks automatically so that ZHA tests run deterministically in isolation.
Expand All @@ -369,24 +358,6 @@ def globally_load_quirks():
yield


@pytest.fixture
def cluster_handler() -> Callable:
"""Clueter handler mock factory fixture."""

def cluster_handler_factory(
name: str, cluster_id: int, endpoint_id: int = 1
) -> MagicMock:
ch = MagicMock()
ch.name = name
ch.generic_id = f"cluster_handler_0x{cluster_id:04x}"
ch.id = f"{endpoint_id}:0x{cluster_id:04x}"
ch.async_configure = AsyncMock()
ch.async_initialize = AsyncMock()
return ch

return cluster_handler_factory


def pytest_collection_modifyitems(config, items):
"""Add the looptime marker to all tests except the test_async.py file."""
for item in items:
Expand Down
146 changes: 1 addition & 145 deletions tests/data/devices/adeo-sin-4-fp-21-equ.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"version": 2,
"ieee": "ab:cd:ef:12:85:66:cc:2e",
"nwk": "0xA2CE",
"manufacturer": "Adeo",
Expand Down Expand Up @@ -294,22 +294,6 @@
"entity_registry_enabled_default": true,
"enabled": true,
"primary": false,
"cluster_handlers": [
{
"class_name": "IdentifyClusterHandler",
"generic_id": "cluster_handler_0x0003",
"endpoint_id": 1,
"cluster": {
"id": 3,
"name": "Identify",
"type": "server"
},
"id": "1:0x0003",
"unique_id": "ab:cd:ef:12:85:66:cc:2e:1:0x0003",
"status": "INITIALIZED",
"value_attribute": null
}
],
"device_ieee": "ab:cd:ef:12:85:66:cc:2e",
"endpoint_id": 1,
"available": true,
Expand Down Expand Up @@ -342,22 +326,6 @@
"entity_registry_enabled_default": true,
"enabled": true,
"primary": false,
"cluster_handlers": [
{
"class_name": "OnOffClusterHandler",
"generic_id": "cluster_handler_0x0006",
"endpoint_id": 1,
"cluster": {
"id": 6,
"name": "On/Off",
"type": "server"
},
"id": "1:0x0006",
"unique_id": "ab:cd:ef:12:85:66:cc:2e:1:0x0006",
"status": "INITIALIZED",
"value_attribute": "on_off"
}
],
"device_ieee": "ab:cd:ef:12:85:66:cc:2e",
"endpoint_id": 1,
"available": true,
Expand Down Expand Up @@ -391,22 +359,6 @@
"entity_registry_enabled_default": true,
"enabled": true,
"primary": false,
"cluster_handlers": [
{
"class_name": "PhillipsRemoteClusterHandler",
"generic_id": "cluster_handler_0xfc00",
"endpoint_id": 1,
"cluster": {
"id": 64512,
"name": "PilotWireCluster",
"type": "server"
},
"id": "1:0xfc00",
"unique_id": "ab:cd:ef:12:85:66:cc:2e:1:0xfc00",
"status": "INITIALIZED",
"value_attribute": null
}
],
"device_ieee": "ab:cd:ef:12:85:66:cc:2e",
"endpoint_id": 1,
"available": true,
Expand Down Expand Up @@ -444,22 +396,6 @@
"entity_registry_enabled_default": false,
"enabled": true,
"primary": false,
"cluster_handlers": [
{
"class_name": "BasicClusterHandler",
"generic_id": "cluster_handler_0x0000",
"endpoint_id": 1,
"cluster": {
"id": 0,
"name": "Basic",
"type": "server"
},
"id": "1:0x0000",
"unique_id": "ab:cd:ef:12:85:66:cc:2e:1:0x0000",
"status": "INITIALIZED",
"value_attribute": null
}
],
"device_ieee": "ab:cd:ef:12:85:66:cc:2e",
"endpoint_id": 1,
"available": true,
Expand Down Expand Up @@ -488,22 +424,6 @@
"entity_registry_enabled_default": false,
"enabled": true,
"primary": false,
"cluster_handlers": [
{
"class_name": "BasicClusterHandler",
"generic_id": "cluster_handler_0x0000",
"endpoint_id": 1,
"cluster": {
"id": 0,
"name": "Basic",
"type": "server"
},
"id": "1:0x0000",
"unique_id": "ab:cd:ef:12:85:66:cc:2e:1:0x0000",
"status": "INITIALIZED",
"value_attribute": null
}
],
"device_ieee": "ab:cd:ef:12:85:66:cc:2e",
"endpoint_id": 1,
"available": true,
Expand Down Expand Up @@ -532,22 +452,6 @@
"entity_registry_enabled_default": true,
"enabled": true,
"primary": false,
"cluster_handlers": [
{
"class_name": "MeteringClusterHandler",
"generic_id": "cluster_handler_0x0702",
"endpoint_id": 1,
"cluster": {
"id": 1794,
"name": "Metering",
"type": "server"
},
"id": "1:0x0702",
"unique_id": "ab:cd:ef:12:85:66:cc:2e:1:0x0702",
"status": "INITIALIZED",
"value_attribute": "instantaneous_demand"
}
],
"device_ieee": "ab:cd:ef:12:85:66:cc:2e",
"endpoint_id": 1,
"available": true,
Expand Down Expand Up @@ -584,22 +488,6 @@
"entity_registry_enabled_default": true,
"enabled": true,
"primary": false,
"cluster_handlers": [
{
"class_name": "MeteringClusterHandler",
"generic_id": "cluster_handler_0x0702",
"endpoint_id": 1,
"cluster": {
"id": 1794,
"name": "Metering",
"type": "server"
},
"id": "1:0x0702",
"unique_id": "ab:cd:ef:12:85:66:cc:2e:1:0x0702",
"status": "INITIALIZED",
"value_attribute": "instantaneous_demand"
}
],
"device_ieee": "ab:cd:ef:12:85:66:cc:2e",
"endpoint_id": 1,
"available": true,
Expand Down Expand Up @@ -638,22 +526,6 @@
"entity_registry_enabled_default": true,
"enabled": true,
"primary": true,
"cluster_handlers": [
{
"class_name": "OnOffClusterHandler",
"generic_id": "cluster_handler_0x0006",
"endpoint_id": 1,
"cluster": {
"id": 6,
"name": "On/Off",
"type": "server"
},
"id": "1:0x0006",
"unique_id": "ab:cd:ef:12:85:66:cc:2e:1:0x0006",
"status": "INITIALIZED",
"value_attribute": "on_off"
}
],
"device_ieee": "ab:cd:ef:12:85:66:cc:2e",
"endpoint_id": 1,
"available": true,
Expand Down Expand Up @@ -682,22 +554,6 @@
"entity_registry_enabled_default": true,
"enabled": true,
"primary": false,
"cluster_handlers": [
{
"class_name": "OtaClientClusterHandler",
"generic_id": "cluster_handler_0x0019_client",
"endpoint_id": 1,
"cluster": {
"id": 25,
"name": "Ota",
"type": "client"
},
"id": "1:0x0019_client",
"unique_id": "ab:cd:ef:12:85:66:cc:2e:1:0x0019_CLIENT",
"status": "INITIALIZED",
"value_attribute": null
}
],
"device_ieee": "ab:cd:ef:12:85:66:cc:2e",
"endpoint_id": 1,
"available": true,
Expand Down
Loading
Loading