ollo69/ha_tuya_custom

Allow climate device hvac_modes default override

maforshaw opened this issue · 2 comments

If the integration cannot determine the hvac_modes of a climate device from the API, it defaults to: off, heat_cool

        if modes is None:
            if HVAC_MODE_HEAT_COOL not in self.operations:
                self.operations.append(HVAC_MODE_HEAT_COOL)
            return

For my device, a heater, that's actually wrong and it should be HVAC_MODE_HEAT. It would therefore be good if the default value could be set via the config rather than hard-coded to HVAC_MODE_HEAT_COOL.

I used HVAC_MODE_HEAT_COOL because is generic, anyway I will keep in consideration your request for future releases.

Thanks, it's a minor detail. I noticed it because the Thermostat Card displays the wrong icon since it uses hvac_modes to determine what to use. Also, the documentation for Climate says you must not set Temperature in climate.set_temperature if hvac_mode is heat_cool, which is actually incorrect in my case because that's all you can set.