Skip to content

Commit

Permalink
fix event handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dmulcahey committed Mar 22, 2024
1 parent 55a1494 commit b2e50c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zha/application/platforms/binary_sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ def handle_cluster_handler_attribute_updated(
self, event: ClusterAttributeUpdatedEvent
) -> None:
"""Handle attribute updates from the cluster handler."""
if self._attribute_name is None or self._attribute_name != event.name:
if self._attribute_name is None or self._attribute_name != event.attribute_name:
return
self._state = bool(event.value)
self._state = bool(event.attribute_value)
self.maybe_send_state_changed_event()

async def async_update(self) -> None:
Expand Down

0 comments on commit b2e50c6

Please sign in to comment.