-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Added temperature (apparent) high/low, deprecated max/min #12233
Conversation
@@ -166,6 +182,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None): | |||
forecast = config.get(CONF_FORECAST) | |||
sensors = [] | |||
for variable in config[CONF_MONITORED_CONDITIONS]: | |||
if variable in DEPRECATED_SENSOR_TYPES: | |||
_LOGGER.warning("Monitored condition %s is deprecated.", |
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.
Just a suggestion, but you could change DEPRECATED_SENSOR_TYPES
to be dictionary instead of a set and provide the "new" name for the condition (maybe even with a message that their new "interval" like currently
or hourly
won't be supported anymore).
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.
currently and hourly don't seem to ever have been supported. I'm not sure why they were in the code. A dictionary isn't a bad idea though.
We don't interact with the Dark Sky API directly, we use |
Note, this changes the naming of the monitored conditions, so IMHO it is a breaking change as well. |
This change seems fine. Marked it as a breaking change. It technically is not but it will be good to include why some types have been marked as deprecated and what the alternative is. Ok to merge when merge conflict resolved. |
Description:
Dark Sky API has deprecated temperatureMin, temperatureMax, apparentTemperatureMin, and apparentTemperatureMax. I added 4 new temperature fields that are the replacements (high/low) and added a check for the old values and log a warning message that they are deprecated.
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#4613
Example entry for
configuration.yaml
(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
tox
run successfully. Your PR cannot be merged unless tests passREQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.