Skip to content

Commit

Permalink
chore: add debug logging for group sensor state changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bramstroker committed Dec 17, 2024
1 parent 4e3ebb5 commit 91ec82e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/powercalc/sensors/group/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ def on_state_change(self, event: Event[EventStateChangedData]) -> None:
new_state = event.data.get("new_state")
if not new_state: # pragma: no cover
return
_LOGGER.debug("Group sensor %s. State change for %s: %s", self.entity_id, new_state.entity_id, new_state)
calculated_new_state = self.calculate_new_state(new_state)
self.set_new_state(calculated_new_state)

Expand Down

0 comments on commit 91ec82e

Please sign in to comment.