Skip to content

Commit

Permalink
Fix switch status after (re)setup
Browse files Browse the repository at this point in the history
  • Loading branch information
basbruss committed May 8, 2024
1 parent 888ebc8 commit fde0b9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/adaptive_cover/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ def __init__(self, hass: HomeAssistant) -> None: # noqa: D107
self._climate_mode = self.config_entry.options.get(CONF_CLIMATE_MODE, False)
self._switch_mode = True if self._climate_mode else False
self._inverse_state = self.config_entry.options.get(CONF_INVERSE_STATE, False)
self._temp_toggle = False
self._control_toggle = True
self._manual_toggle = True
self._temp_toggle = None
self._control_toggle = None
self._manual_toggle = None
self.manual_reset = self.config_entry.options.get(
CONF_MANUAL_OVERRIDE_RESET, False
)
Expand Down Expand Up @@ -206,7 +206,7 @@ async def _async_update_data(self) -> AdaptiveCoverData:

self.default_state = round(NormalCoverState(cover_data).get_state())

if self.cover_state_change and self._manual_toggle and self.control_toggle:
if self.cover_state_change and self.manual_toggle and self.control_toggle:
self.manager.handle_state_change(
self.state_change_data,
self.state,
Expand Down

0 comments on commit fde0b9a

Please sign in to comment.