Skip to content

Commit

Permalink
Fix changing the preset mode (#64119)
Browse files Browse the repository at this point in the history
  • Loading branch information
bieniu committed Jan 14, 2022
1 parent b1848cd commit 3265a09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/shelly/climate.py
Expand Up @@ -272,10 +272,10 @@ async def async_set_hvac_mode(self, hvac_mode: str) -> None:

async def async_set_preset_mode(self, preset_mode: str) -> None:
"""Set preset mode."""
if not self._attr_preset_modes:
if not self._preset_modes:
return

preset_index = self._attr_preset_modes.index(preset_mode)
preset_index = self._preset_modes.index(preset_mode)

if preset_index == 0:
await self.set_state_full_path(schedule=0)
Expand Down

0 comments on commit 3265a09

Please sign in to comment.