Skip to content

Commit

Permalink
fix: ensures timed openings works with on/off state as well
Browse files Browse the repository at this point in the history
Fixes #56
  • Loading branch information
= authored and swingerman committed Jul 16, 2023
1 parent 07bd399 commit 26861df
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion custom_components/dual_smart_thermostat/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,9 @@ async def _async_opening_changed(self, event):
break

# schdule the closing of the opening
if opening_timeout is not None and new_state.state == STATE_OPEN:
if opening_timeout is not None and (
new_state.state == STATE_OPEN or new_state.state == STATE_ON
):
_LOGGER.debug(
"Scheduling state open of opening %s in %s",
opening_entity,
Expand Down Expand Up @@ -1013,6 +1015,11 @@ def _is_opening_open(self):
opening_entity,
STATE_OPEN,
opening[ATTR_TIMEOUT],
) or condition.state(
self.hass,
opening_entity,
STATE_ON,
opening[ATTR_TIMEOUT],
):
_is_open = True
_LOGGER.debug(
Expand Down

0 comments on commit 26861df

Please sign in to comment.