Fix problem with using Traccar event (#23543)

pull/23562/head
Klaas Schoute 2019-04-30 08:02:45 +02:00 committed by Joakim Sørensen
parent 1d70005b01
commit 5d5f073cff
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ class TraccarScanner:
if events is not None:
for event in events:
device_name = next((
dev.get('name') for dev in self._api.devices()
dev.get('name') for dev in self._api.devices
if dev.get('id') == event['deviceId']), None)
self._hass.bus.async_fire(
'traccar_' + self._event_types.get(event["type"]), {