Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
because device_id is a string and the keys in _self.devices are integers...

Maybe some other code should be changed so the types match, but this fixes the issue.
Now the device_list is populated (is it really a list, it's always just one device, or am I missing something? )
  • Loading branch information
MarkJenniskens committed Aug 12, 2019
1 parent 7462194 commit d4653c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyvera/subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def _event(self, device_data_list, device_alert_list):

for device_id in device_ids:
try:
device_list = self._devices.get(device_id, ())
device_list = self._devices.get(int(device_id), ())
device_datas = [data for data in device_data_list if data.get('id') == device_id]
device_alerts = [alert for alert in device_alert_list if alert.get('PK_Device') == device_id]

Expand Down

0 comments on commit d4653c5

Please sign in to comment.