Skip to content

Commit

Permalink
make target temp sensor unavailable if climate is off sensor.wiser_lt…
Browse files Browse the repository at this point in the history
…s_target_temperature_main_bedroom reporting "Off" #447
  • Loading branch information
msp1974 committed Mar 4, 2024
1 parent fccad0d commit 34c5ad1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/wiser/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
)
from homeassistant.const import (
ATTR_BATTERY_LEVEL,
STATE_UNAVAILABLE,
UnitOfTemperature,
UnitOfElectricCurrent,
UnitOfElectricPotential,
Expand Down Expand Up @@ -836,7 +837,7 @@ def _handle_coordinator_update(self) -> None:
).current_target_temperature
== TEMP_OFF
):
self._state = None
self._state = STATE_UNAVAILABLE
else:
self._state = self._data.wiserhub.rooms.get_by_id(
self._device_id
Expand Down

0 comments on commit 34c5ad1

Please sign in to comment.