diff --git a/custom_components/climate_group/climate.py b/custom_components/climate_group/climate.py index d88febe..04aca34 100644 --- a/custom_components/climate_group/climate.py +++ b/custom_components/climate_group/climate.py @@ -189,14 +189,18 @@ async def _async_master_changed(self, entity_id, old_state, new_state): command[ATTR_TARGET_TEMP_HIGH] = new_state.attributes.get( ATTR_TARGET_TEMP_HIGH ) + await self.async_set_temperature(command) + + + if old_state.state != new_state.state: + await self.async_set_hvac_mode({HVAC_MODES: new_state.state}}) + if old_state.attributes.get(ATTR_PRESET_MODES) != new_state.attributes.get( ATTR_PRESET_MODES ): - command[ATTR_TEMPERATURE] = new_state.attributes.get(ATTR_TEMPERATURE) - - await self.async_set_preset_mode(command) + await self.async_set_preset_mode({ATTR_PRESET_MODES: new_state.attributes.get(ATTR_TEMPERATURE)}}) @property def name(self) -> str: