diff --git a/tests/test_cluster_handlers.py b/tests/test_cluster_handlers.py index a4c25cf3..4325912b 100644 --- a/tests/test_cluster_handlers.py +++ b/tests/test_cluster_handlers.py @@ -1365,7 +1365,12 @@ async def test_zha_send_event_from_quirk( assert on_off_ch.emit_zha_event.mock_calls == [ call( "attribute_updated", - {"attribute_id": 0, "attribute_name": "on_off", "attribute_value": True}, + { + "attribute_id": 0, + "attribute_name": "on_off", + "attribute_value": True, + "value": True, + }, ) ] @@ -1381,6 +1386,7 @@ async def test_zha_send_event_from_quirk( "attribute_id": 0x25, "attribute_name": "Unknown", "attribute_value": "Bar", + "value": "Bar", }, ) ] diff --git a/zha/zigbee/cluster_handlers/__init__.py b/zha/zigbee/cluster_handlers/__init__.py index 3ff76ee1..321b9e19 100644 --- a/zha/zigbee/cluster_handlers/__init__.py +++ b/zha/zigbee/cluster_handlers/__init__.py @@ -44,6 +44,7 @@ REPORT_CONFIG_ATTR_PER_REQ, SIGNAL_ATTR_UPDATED, UNIQUE_ID, + VALUE, ) if TYPE_CHECKING: @@ -711,6 +712,7 @@ def attribute_updated(self, attrid: int, value: Any, timestamp: Any) -> None: ATTRIBUTE_ID: attrid, ATTRIBUTE_NAME: attr_name, ATTRIBUTE_VALUE: value, + VALUE: value, }, ) diff --git a/zha/zigbee/cluster_handlers/const.py b/zha/zigbee/cluster_handlers/const.py index c4eafb05..0984c687 100644 --- a/zha/zigbee/cluster_handlers/const.py +++ b/zha/zigbee/cluster_handlers/const.py @@ -109,3 +109,4 @@ SIGNAL_SET_LEVEL: Final[str] = "set_level" SIGNAL_STATE_ATTR: Final[str] = "update_state_attribute" UNKNOWN: Final[str] = "unknown" +VALUE: Final[str] = "value"