Skip to content

Commit

Permalink
Convert the device_id from string to in
Browse files Browse the repository at this point in the history
Before, the code wasn't able to find the device on the self._devices because it was a string, now converting it to int is working again. Tested locally with my Vera controller.
  • Loading branch information
guerrerotook committed Aug 14, 2019
1 parent 7462194 commit 8d1c61f
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 8d1c61f

Please sign in to comment.