Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HVAC mode duplication for Shelly Gen2 climate platform #105812

Merged
merged 1 commit into from Dec 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions homeassistant/components/shelly/climate.py
Expand Up @@ -420,7 +420,6 @@ def _handle_coordinator_update(self) -> None:
class RpcClimate(ShellyRpcEntity, ClimateEntity):
"""Entity that controls a thermostat on RPC based Shelly devices."""

_attr_hvac_modes = [HVACMode.OFF]
_attr_icon = "mdi:thermostat"
_attr_max_temp = RPC_THERMOSTAT_SETTINGS["max"]
_attr_min_temp = RPC_THERMOSTAT_SETTINGS["min"]
Expand All @@ -436,9 +435,9 @@ def __init__(self, coordinator: ShellyRpcCoordinator, id_: int) -> None:
"type", "heating"
)
if self._thermostat_type == "cooling":
self._attr_hvac_modes.append(HVACMode.COOL)
self._attr_hvac_modes = [HVACMode.OFF, HVACMode.COOL]
else:
self._attr_hvac_modes.append(HVACMode.HEAT)
self._attr_hvac_modes = [HVACMode.OFF, HVACMode.HEAT]

@property
def target_temperature(self) -> float | None:
Expand Down