mww012 / hass-infinitive

Infinitive Climate Integration for Home Assistant
21 stars 5 forks source link

Preset Modes Bugfix #1

Closed seantibor closed 3 years ago

seantibor commented 4 years ago

The preset_modes property is supposed to return a list of available presets but was instead returning just the singular self._preset_mode internal property. I changed the behavior to return a list of the PRESET_HOLD and PRESET_HOME preset constants, plus changed the update function to return the PRESET_HOME if the hold status is not True.

These changes fixed an issue I was having synchronizing the entity to the Google Assistant service through Nabu Casa.

mww012 commented 3 years ago

Hey, sorry it took a bit to respond. Life's been chaotic. I'll go ahead and merge this in.