Skip to content

Commit

Permalink
Merge pull request #159 from Robbe-B/fix_stove_heat
Browse files Browse the repository at this point in the history
Fix climate entity switching to 'Heat' when the stove is unplugged
  • Loading branch information
Robbe-B authored Sep 18, 2024
2 parents 3b834cb + 2db0c5b commit 43c1378
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion custom_components/maestro_mcz/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ def handle_coordinator_update_internal(self) -> None:
hasattr(self.coordinator._maestroapi.Status, self._supported_power_sensor.sensor_get_name)):
stato_stufa = getattr(self.coordinator._maestroapi.Status, self._supported_power_sensor.sensor_get_name)
if(stato_stufa is not None):
if(stato_stufa == 0 or stato_stufa == 1):
if(stato_stufa == -1 or #disconnected
stato_stufa == 0 or #off
stato_stufa == 1 #turning off
):
self._attr_hvac_mode = HVACMode.OFF
else:
self._attr_hvac_mode = HVACMode.HEAT
Expand Down

0 comments on commit 43c1378

Please sign in to comment.