Skip to content

Commit

Permalink
Fix timer switch in Sensibo (#96911)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjohansson-ST authored and frenck committed Jul 20, 2023
1 parent 0c10005 commit db32aa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion homeassistant/components/sensibo/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,10 @@ def extra_state_attributes(self) -> Mapping[str, Any] | None:
@async_handle_api_call
async def async_turn_on_timer(self, key: str, value: bool) -> bool:
"""Make service call to api for setting timer."""
new_state = not self.device_data.device_on
data = {
"minutesFromNow": 60,
"acState": {**self.device_data.ac_states, "on": value},
"acState": {**self.device_data.ac_states, "on": new_state},
}
result = await self._client.async_set_timer(self._device_id, data)
return bool(result.get("status") == "success")
Expand Down

0 comments on commit db32aa7

Please sign in to comment.