ha-warmup/warmup

Invalid Min/Max temperature, can't set temperature through Home Assistant to anything reasonable.

Closed this issue · 5 comments

rct commented

I can't use Home Assistant to set a reasonable temperature for a Warmup thermostat because of the min_temp and max_temp attributes in the climate entity.

I'm in the US, so the unit system Home Assistant is using is Imperial (Fahrenheit). This may be related to #12 - temperature unit conversion

In Home Assistant the Min/Max temperature attributes show up as:

min_temp: 106
max_temp: 187

The lowest temperature I can set the thermostat to via Home Assistant is 86 F (30 C).

It could be that the temperature values were set in Fahrenheit and have been double converted to Celsius:

  • 106 F = ~41 C, 41 F would be a reasonable minimum.
  • 187 F = ~86 C, 86 F would be a reasonable maximum.

When I try to adjust the temperature through Home Assistant, It tries to set the temperature to 106 F (the minimum value) and then winds up setting to 86 F. (Some part of the system maybe enforcing the 86 F maximum and 86 F does make it through to the thermostat.)

The range of temperatures the Warmup Web Portal will let me set is 41 F to 86 F. So it seems plausible these values are already in Fahrenheit and are being converted from C to F incorrectly.

as far as I can see, this warmup component assumes the thermostats themselves are reporting CELCIUS. It's hard coded. Not sure if we can read out that setting through the api, but willing to take a look.

Can you confirm that your thermostat itself is set to Celsius? If Fahrenheit, can you try changing that and see if the conversion is done right in HA?

artmg commented

Hi @rct the temperature conversion in this custom component was somewhat limited, and only applied to min and max temperatures. For other reasons #42, this conversion has now been removed #46, so either:

  • your issue might have gone away (as long as your brain can handle the freezing-cold-sounding ranges of Celcius)
  • or it might just have gotten worse

Please try out the component version now available on the latest master branch, and let us know. In the future we hope to have temperature conversion working #48, but for now we hope you are keeping warm

rct commented

I somehow never saw the replies in this issue. I'll give things a test.

However, @kkoenen mentioned:

as far as I can see, this warmup component assumes the thermostats themselves are reporting CELCIUS. It's hard coded. Not sure if we can read out that setting through the api, but willing to take a look.

Can you confirm that your thermostat itself is set to Celsius? If Fahrenheit, can you try changing that and see if the conversion is done right in HA?

I'm in the US, the "Temperature Format" setting on each physical thermostat is set to "F". The Warmup web portal and iOS app seem to get this right, though the web portal does have some conversion problems in a few places, so I'll wind up with strange temperatures.

rct commented

Progress! I've got the current code running from the development hacs_restructure branch after #51 was merged.

So the fixes now show a correct Min/Max temperature in Fahrenheit.

  • min_temp: 41 (was showing 106 before)
  • max_temp: 86 (was 187)

So I believe the problem with the double conversion is fixed.

Both before and after the fix, temperature (set point) and current_temperature show reasonable local values in F.

There are still however a number of temperature related attributes that are still in Celsius and aren't getting converted/localized (presumably by Home Assistant).

Ideally these would get localized too. I suspect override, etc. wouldn't work without them. Maybe the types/units for them aren't being set correctly so that Home Assistant knows they are device class == temperature and unit of measurement is 'C'?

floor_temperature: 18
air_temperature: 21.5
away_temperature: 16
comfort_temperature: 20
fixed_temperature: 15
override_temperature: 20
sleep_temperature: 18
artmg commented

Thanks for the great detail on which other attributes are working or not. I have ported this information into the newer issue #48, so we can work on it there. So if you are happy, @rct then please close this (original) issue as solved