From 106ae184322c21cf820647261bc9caa70119f529 Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Wed, 24 Feb 2021 11:15:01 -0500 Subject: [PATCH] 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 Co-authored-by: Milan Meulemans --- homeassistant/components/climacell/const.py | 2 ++ homeassistant/components/climacell/strings.json | 8 ++++---- homeassistant/components/climacell/weather.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/climacell/const.py b/homeassistant/components/climacell/const.py index 28117a164f8..f2d0a596121 100644 --- a/homeassistant/components/climacell/const.py +++ b/homeassistant/components/climacell/const.py @@ -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, diff --git a/homeassistant/components/climacell/strings.json b/homeassistant/components/climacell/strings.json index 45a1d5b7404..be80ac4e506 100644 --- a/homeassistant/components/climacell/strings.json +++ b/homeassistant/components/climacell/strings.json @@ -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%]" } } }, diff --git a/homeassistant/components/climacell/weather.py b/homeassistant/components/climacell/weather.py index a4802586bf1..da3282108a5 100644 --- a/homeassistant/components/climacell/weather.py +++ b/homeassistant/components/climacell/weather.py @@ -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, )