Minimum Temperature for a thermostat

Hi

I’m having trouble getting the generic_thermostat and/or the Lovelace thermostat card to work with a minimum temperature of 0 degrees.

In configuration.yaml i have:

climate:
  - platform: generic_thermostat
    name: Living Room
    heater: switch.zone
    target_sensor: sensor.livingroom_temperature
    min_temp: 0
    max_temp: 25
    target_temp: 18

And in the UI I have:

entity: climate.living_room
type: thermostat

Which results in this:

The trouble is the minimum temperature is showing as 7 degrees, not the 0 degrees I wanted.

Have I done something wrong? How can I fix this?

Many thanks
Adam

By the way. I tried experimenting with and alternative Lovelace card (https://github.com/nervetattoo/simple-thermostat) and it still has 7 degrees at the minimum temperature. This is making me think the issue is with the generic_thermostat.

Would really appreciate some help debugging this.

Cheers
Adam

Yes it is a problem with generic thermostat. Here’s the code:

    @property
    def min_temp(self):
        """Return the minimum temperature."""
        if self._min_temp:
            return self._min_temp

        # get default temp from super class
        return super().min_temp

Now it looks like that should work. But what the dev didn’t account for is that if self._min_temp is set to zero, the if self._min_temp: will fail the if check and return the baseclasses minimum temperature, which is 7.

To get around this issue, just set your min_temp to -1.

EDIT: Just made a pr to fix

thanks! the -1 workaround is good for now and I hope your PR is accepted.

Adam

accepted and merged, probably be in a later version of 106 or 107

1 Like