Automatic Device Tracker Bug Fix (#3330)

* Iterate over items

* Pass display name as host name
This commit is contained in:
Teagan Glenn 2016-09-11 22:53:05 -06:00 committed by Paulus Schoutsen
parent 26abe83be5
commit 360a650370
2 changed files with 3 additions and 1 deletions

View file

@ -142,6 +142,7 @@ class AutomaticDeviceScanner(object):
for vehicle in self.last_results:
dev_id = vehicle.get('id')
host_name = vehicle.get('display_name')
attrs = {
'fuel_level': vehicle.get('fuel_level_percent')
@ -149,6 +150,7 @@ class AutomaticDeviceScanner(object):
kwargs = {
'dev_id': dev_id,
'host_name': host_name,
'mac': dev_id,
ATTR_ATTRIBUTES: attrs
}