Skip to content

Commit

Permalink
debug last message received
Browse files Browse the repository at this point in the history
  • Loading branch information
grimmpp committed Feb 14, 2024
1 parent 8cc9d24 commit debc852
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions custom_components/eltako/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ def load_value_initially(self, latest_state:State):
elif hasattr(self, '_attr_is_on'):
self._attr_is_on = 'on' == latest_state.state
self._attr_state = latest_state.state
def my_state():
return 'on' if self._attr_is_on else 'off'
self.state = my_state

elif attributs.get('state_class', None) == 'measurement':
if '.' in latest_state.state:
Expand Down

0 comments on commit debc852

Please sign in to comment.