-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
Fix unit conversion #14730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix unit conversion #14730
Conversation
|
||
return DEFAULT_MAX_TEMP | ||
return convert_temperature(self._max_temp, self._unit, | ||
hass.config.units.temperature_unit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'hass'
|
||
return DEFAULT_MIN_TEMP | ||
return convert_temperature(self._min_temp, self._unit, | ||
hass.config.units.temperature_unit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'hass'
@@ -268,7 +267,8 @@ def min_temp(self): | |||
if self._min_temp: | |||
return self._min_temp | |||
|
|||
return DEFAULT_MIN_TEMP | |||
# get default temp from super class | |||
return ClimateDevice.min_temp.fget(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't you call super().min_temp
like you do in the other platforms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just reverting to the previous version... but I agree with your comment, will do the change
btw impressive that you managed to open a PR 7 days ago with a fix for a PR I merged 3 hours ago 😝 |
Thats how long ago I noticed the issue (during review) and prepared this :) |
Description:
In a previous accepted PR #14690 a bug was introduced when global HA temperature unit in Fahrenheit.
This PR reverts changes in generic_thermostat and sensible, but re-engineers tado, since tado always has a min_temp/max_temp and doesn't require the DEFAULT_*.
Related issue (if applicable): fixes #14690
Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices: