Skip to content

Commit

Permalink
Fix set hvac mode for BSB devices (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
fustom authored Jan 10, 2025
1 parent 41fbfd1 commit f7e9acb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions custom_components/ariston/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import logging

from ariston.const import PlantMode, ZoneMode
from ariston.const import PlantMode, ZoneMode, BsbZoneMode
from homeassistant.components.climate import (
ClimateEntity,
ClimateEntityFeature,
Expand Down Expand Up @@ -247,8 +247,13 @@ async def async_set_hvac_mode(self, hvac_mode):
)
else:
await self.device.async_set_zone_mode(ZoneMode.MANUAL, self.zone)
else:
await self.device.async_set_zone_mode(hvac_mode, self.zone)
# Plant mode is not supported (BSB device)
elif hvac_mode == HVACMode.OFF:
await self.device.async_set_zone_mode(BsbZoneMode.OFF, self.zone)
elif hvac_mode == HVACMode.AUTO:
await self.device.async_set_zone_mode(BsbZoneMode.TIME_PROGRAM, self.zone)
elif hvac_mode == HVACMode.HEAT:
await self.device.async_set_zone_mode(BsbZoneMode.MANUAL, self.zone)

self.async_write_ha_state()

Expand Down

0 comments on commit f7e9acb

Please sign in to comment.