Merge branch 'dev' into sensor_template

This commit is contained in:
pavoni 2016-01-21 23:17:53 +00:00
commit 8b5751ad44
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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':