Climacell fixes: Use common keys for strings, fix temp_low measurement, add windy condition (#46991)

* use common keys for lat and long

* additional fixes

* Update homeassistant/components/climacell/strings.json

Co-authored-by: Milan Meulemans <milan.meulemans@live.be>

Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
This commit is contained in:
Raman Gupta
2021-02-24 11:15:01 -05:00
committed by GitHub
parent 11a89bc3ac
commit 106ae18432
3 changed files with 7 additions and 5 deletions
@@ -12,6 +12,7 @@ from homeassistant.components.weather import (
ATTR_CONDITION_SNOWY,
ATTR_CONDITION_SNOWY_RAINY,
ATTR_CONDITION_SUNNY,
ATTR_CONDITION_WINDY,
)
CONF_TIMESTEP = "timestep"
@@ -33,6 +34,7 @@ ATTRIBUTION = "Powered by ClimaCell"
MAX_REQUESTS_PER_DAY = 1000
CONDITIONS = {
"breezy": ATTR_CONDITION_WINDY,
"freezing_rain_heavy": ATTR_CONDITION_SNOWY_RAINY,
"freezing_rain": ATTR_CONDITION_SNOWY_RAINY,
"freezing_rain_light": ATTR_CONDITION_SNOWY_RAINY,
@@ -3,12 +3,12 @@
"config": {
"step": {
"user": {
"description": "If [%key:component::climacell::config::step::user::data::latitude%] and [%key:component::climacell::config::step::user::data::longitude%] are not provided, the default values in the Home Assistant configuration will be used. An entity will be created for each forecast type but only the ones you select will be enabled by default.",
"description": "If [%key:common::config_flow::data::latitude%] and [%key:common::config_flow::data::longitude%] are not provided, the default values in the Home Assistant configuration will be used. An entity will be created for each forecast type but only the ones you select will be enabled by default.",
"data": {
"name": "Name",
"name": "[%key:common::config_flow::data::name%]",
"api_key": "[%key:common::config_flow::data::api_key%]",
"latitude": "Latitude",
"longitude": "Longitude"
"latitude": "[%key:common::config_flow::data::latitude%]",
"longitude": "[%key:common::config_flow::data::longitude%]"
}
}
},
@@ -275,7 +275,7 @@ class ClimaCellWeatherEntity(ClimaCellEntity, WeatherEntity):
(
self._get_cc_value(item, CC_ATTR_TEMPERATURE_LOW)
for item in forecast[CC_ATTR_TEMPERATURE]
if "max" in item
if "min" in item
),
temp_low,
)