[device_tracker.gpslogger] Add additional activity attribute.
parent
7ba25f3526
commit
cdf9464698
|
@ -63,6 +63,7 @@ class GPSLoggerView(HomeAssistantView):
|
|||
accuracy = int(float(data['accuracy']))
|
||||
if 'battery' in data:
|
||||
battery = float(data['battery'])
|
||||
|
||||
attrs = {}
|
||||
if 'speed' in data:
|
||||
attrs['speed'] = float(data['speed'])
|
||||
|
@ -72,6 +73,8 @@ class GPSLoggerView(HomeAssistantView):
|
|||
attrs['altitude'] = float(data['altitude'])
|
||||
if 'provider' in data:
|
||||
attrs['provider'] = data['provider']
|
||||
if 'activity' in data:
|
||||
attrs['activity'] = data['activity']
|
||||
|
||||
yield from hass.loop.run_in_executor(
|
||||
None, partial(self.see, dev_id=device,
|
||||
|
|
Loading…
Reference in New Issue