From f19a46dcfe787133b1130349a0cb7b26fe86d596 Mon Sep 17 00:00:00 2001 From: Robert Marklund Date: Thu, 21 Jan 2016 22:04:18 +0100 Subject: [PATCH] yr.no: fix some bugs in the component Someone forgot some in:s and () Also added windGust sensor. Signed-off-by: Robert Marklund --- homeassistant/components/sensor/yr.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/sensor/yr.py b/homeassistant/components/sensor/yr.py index 08abffb758d..66d334cb17d 100644 --- a/homeassistant/components/sensor/yr.py +++ b/homeassistant/components/sensor/yr.py @@ -25,6 +25,7 @@ SENSOR_TYPES = { 'precipitation': ['Condition', 'mm'], 'temperature': ['Temperature', '°C'], 'windSpeed': ['Wind speed', 'm/s'], + 'windGust': ['Wind gust', 'm/s'], 'pressure': ['Pressure', 'mbar'], 'windDirection': ['Wind direction', '°'], 'humidity': ['Humidity', '%'], @@ -143,11 +144,11 @@ class YrSensor(Entity): elif self.type == 'symbol' and valid_from < now: self._state = loc_data[self.type]['@number'] break - elif self.type == ('temperature', 'pressure', 'humidity', + elif self.type in ('temperature', 'pressure', 'humidity', 'dewpointTemperature'): self._state = loc_data[self.type]['@value'] break - elif self.type == 'windSpeed': + elif self.type in ('windSpeed', 'windGust'): self._state = loc_data[self.type]['@mps'] break elif self.type == 'windDirection':