Skip to content

Commit

Permalink
Get state
Browse files Browse the repository at this point in the history
  • Loading branch information
basbruss committed Mar 6, 2024
1 parent efc85d8 commit 6e17682
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/adaptive_cover/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ def name(self):
@property
def is_on(self) -> bool:
"""Return true if the binary sensor is on."""
return self._state
return self.coordinator.data.states["binary"]
1 change: 1 addition & 0 deletions custom_components/adaptive_cover/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ async def _async_update_data(self) -> AdaptiveCoverData:
states={
"normal": default_state,
"climate": climate_state,
"binary": NormalCoverState(cover_data).cover.valid,
},
attributes={
"default": self.config_entry.options.get(CONF_DEFAULT_HEIGHT),
Expand Down

0 comments on commit 6e17682

Please sign in to comment.