From 0bdd29357213970bc6b4299b16eac6d2552e6f51 Mon Sep 17 00:00:00 2001 From: Robert Marklund Date: Thu, 21 Jan 2016 20:49:17 +0100 Subject: [PATCH 1/2] kodi: remove traceback on state check If the computer is sleeping that are running xbmc then the traceback is printed in the log all the time. Keep the traceback in debug mode of the module if needed. Signed-off-by: Robert Marklund --- homeassistant/components/media_player/kodi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/media_player/kodi.py b/homeassistant/components/media_player/kodi.py index 6fe6be554c6..867255a43c4 100644 --- a/homeassistant/components/media_player/kodi.py +++ b/homeassistant/components/media_player/kodi.py @@ -72,7 +72,8 @@ class KodiDevice(MediaPlayerDevice): try: return self._server.Player.GetActivePlayers() except jsonrpc_requests.jsonrpc.TransportError: - _LOGGER.exception('Unable to fetch kodi data') + _LOGGER.warning('Unable to fetch kodi data') + _LOGGER.debug('Unable to fetch kodi data', exc_info=True) return None @property From f19a46dcfe787133b1130349a0cb7b26fe86d596 Mon Sep 17 00:00:00 2001 From: Robert Marklund Date: Thu, 21 Jan 2016 22:04:18 +0100 Subject: [PATCH 2/2] 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':