mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Merge branch 'dev' into sensor_template
This commit is contained in:
commit
8b5751ad44
@ -72,7 +72,8 @@ class KodiDevice(MediaPlayerDevice):
|
|||||||
try:
|
try:
|
||||||
return self._server.Player.GetActivePlayers()
|
return self._server.Player.GetActivePlayers()
|
||||||
except jsonrpc_requests.jsonrpc.TransportError:
|
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
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -25,6 +25,7 @@ SENSOR_TYPES = {
|
|||||||
'precipitation': ['Condition', 'mm'],
|
'precipitation': ['Condition', 'mm'],
|
||||||
'temperature': ['Temperature', '°C'],
|
'temperature': ['Temperature', '°C'],
|
||||||
'windSpeed': ['Wind speed', 'm/s'],
|
'windSpeed': ['Wind speed', 'm/s'],
|
||||||
|
'windGust': ['Wind gust', 'm/s'],
|
||||||
'pressure': ['Pressure', 'mbar'],
|
'pressure': ['Pressure', 'mbar'],
|
||||||
'windDirection': ['Wind direction', '°'],
|
'windDirection': ['Wind direction', '°'],
|
||||||
'humidity': ['Humidity', '%'],
|
'humidity': ['Humidity', '%'],
|
||||||
@ -143,11 +144,11 @@ class YrSensor(Entity):
|
|||||||
elif self.type == 'symbol' and valid_from < now:
|
elif self.type == 'symbol' and valid_from < now:
|
||||||
self._state = loc_data[self.type]['@number']
|
self._state = loc_data[self.type]['@number']
|
||||||
break
|
break
|
||||||
elif self.type == ('temperature', 'pressure', 'humidity',
|
elif self.type in ('temperature', 'pressure', 'humidity',
|
||||||
'dewpointTemperature'):
|
'dewpointTemperature'):
|
||||||
self._state = loc_data[self.type]['@value']
|
self._state = loc_data[self.type]['@value']
|
||||||
break
|
break
|
||||||
elif self.type == 'windSpeed':
|
elif self.type in ('windSpeed', 'windGust'):
|
||||||
self._state = loc_data[self.type]['@mps']
|
self._state = loc_data[self.type]['@mps']
|
||||||
break
|
break
|
||||||
elif self.type == 'windDirection':
|
elif self.type == 'windDirection':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user