Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyit600/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
# HVAC states
CURRENT_HVAC_OFF = "off"
CURRENT_HVAC_HEAT = "heating"
CURRENT_HVAC_HEAT_IDLE = "heating (idling)"
CURRENT_HVAC_HEAT_IDLE = "idle"
CURRENT_HVAC_COOL = "cooling"
CURRENT_HVAC_COOL_IDLE = "cooling (idling)"
CURRENT_HVAC_COOL_IDLE = "idle"
CURRENT_HVAC_IDLE = "idle"

# Supported presets
Expand Down
14 changes: 7 additions & 7 deletions pyit600/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,9 @@ async def _refresh_climate_devices(self, devices: List[Any], send_callback=False
target_temperature=(ther["HeatingSetpoint_x100"] / 100) if is_heating else (ther["CoolingSetpoint_x100"] / 100),
max_temp=(ther.get("MaxHeatSetpoint_x100", 4000) / 100) if is_heating else (ther.get("MaxCoolSetpoint_x100", 4000) / 100),
min_temp=(ther.get("MinHeatSetpoint_x100", 500) / 100) if is_heating else (ther.get("MinCoolSetpoint_x100", 500) / 100),
hvac_mode=HVAC_MODE_HEAT if ther["SystemMode"] == 4 else HVAC_MODE_COOL if ther["SystemMode"] == 3 else HVAC_MODE_AUTO,
hvac_action=CURRENT_HVAC_OFF if scomm["HoldType"] == 7 else CURRENT_HVAC_IDLE if ther["RunningState"] == 0 else CURRENT_HVAC_HEAT if is_heating and ther["RunningState"] == 33 else CURRENT_HVAC_HEAT_IDLE if is_heating else CURRENT_HVAC_COOL if ther["RunningState"] == 66 else CURRENT_HVAC_COOL_IDLE,
hvac_modes=[HVAC_MODE_HEAT, HVAC_MODE_COOL, HVAC_MODE_AUTO],
hvac_mode=HVAC_MODE_OFF if scomm["HoldType"] == 7 else HVAC_MODE_HEAT if ther["SystemMode"] == 4 else HVAC_MODE_COOL if ther["SystemMode"] == 3 else HVAC_MODE_AUTO,
hvac_action=CURRENT_HVAC_OFF if scomm["HoldType"] == 7 else CURRENT_HVAC_HEAT if ther["RunningState"] & 1 else CURRENT_HVAC_COOL if ther["RunningState"] & 2 else CURRENT_HVAC_IDLE,
hvac_modes=[HVAC_MODE_OFF, HVAC_MODE_HEAT, HVAC_MODE_COOL, HVAC_MODE_AUTO],
preset_mode=PRESET_OFF if scomm["HoldType"] == 7 else PRESET_PERMANENT_HOLD if scomm["HoldType"] == 2 else PRESET_ECO if scomm["HoldType"] == 10 else PRESET_TEMPORARY_HOLD if scomm["HoldType"] == 1 else PRESET_FOLLOW_SCHEDULE,
preset_modes=[PRESET_OFF, PRESET_PERMANENT_HOLD, PRESET_ECO, PRESET_TEMPORARY_HOLD, PRESET_FOLLOW_SCHEDULE],
fan_mode=FAN_MODE_OFF if fan_mode == 0 else FAN_MODE_HIGH if fan_mode == 3 else FAN_MODE_MEDIUM if fan_mode == 2 else FAN_MODE_LOW if fan_mode == 1 else FAN_MODE_AUTO, # fan_mode == 5 => FAN_MODE_AUTO
Expand Down Expand Up @@ -750,7 +750,7 @@ async def set_climate_device_preset(self, device_id: str, preset: str) -> None:
_LOGGER.error("Cannot set mode: climate device not found with the specified id: %s", device_id)
return

if device.model == 'FC600':
if device.model in ('FC600', 'ALTHRSQ800WRF'):
request_data = { "sComm": { "SetHoldType": 7 if preset == PRESET_OFF else 10 if preset == PRESET_ECO else 2 if preset == PRESET_PERMANENT_HOLD else 1 if preset == PRESET_TEMPORARY_HOLD else 0 } }
else:
request_data = { "sIT600TH": { "SetHoldType": 7 if preset == PRESET_OFF else 2 if preset == PRESET_PERMANENT_HOLD else 0 } }
Expand All @@ -777,8 +777,8 @@ async def set_climate_device_mode(self, device_id: str, mode: str) -> None:
_LOGGER.error("Cannot set mode: device not found with the specified id: %s", device_id)
return

if device.model == 'FC600':
request_data = { "sTherS": { "SetSystemMode": 4 if mode == HVAC_MODE_HEAT else 3 if mode == HVAC_MODE_COOL else HVAC_MODE_AUTO } }
if device.model in ('FC600', 'ALTHRSQ800WRF'):
request_data = { "sComm": { "SetHoldType": 7 } } if mode == HVAC_MODE_OFF else { "sComm": { "SetHoldType": 2 }, "sTherS": { "SetSystemMode": 4 if mode == HVAC_MODE_HEAT else 3 if mode == HVAC_MODE_COOL else 1 } }
else:
request_data = { "sIT600TH": { "SetHoldType": 7 if mode == HVAC_MODE_OFF else 0 } }

Expand Down Expand Up @@ -852,7 +852,7 @@ async def set_climate_device_temperature(self, device_id: str, setpoint_celsius:
_LOGGER.error("Cannot set mode: climate device not found with the specified id: %s", device_id)
return

if device.model == 'FC600':
if device.model in ('FC600', 'ALTHRSQ800WRF'):
if device.hvac_mode == HVAC_MODE_COOL:
request_data = { "sTherS": { "SetCoolingSetpoint_x100": int(self.round_to_half(setpoint_celsius) * 100) } }
else:
Expand Down