Skip to content

Commit

Permalink
Merge pull request #3 from gurumitts/use_ssh
Browse files Browse the repository at this point in the history
fixes subscriptions
  • Loading branch information
gurumitts authored Apr 18, 2017
2 parents 82e4546 + f6983de commit c58de4f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pylutron_caseta/smartbridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,13 @@ def _handle_respose(self, resp_json):
zone = zone[zone.rfind('/')+1:]
level = body['ZoneStatus']['Level']
_LOG.debug('zone=%s level=%s', zone, level)
for device in self.devices:
for _device_id in self.devices:
device = self.devices[_device_id]
if 'zone' in device:
if zone == device['zone']:
device['current_state'] = level
if _device_id in self._subscribers:
self._subscribers[_device_id]()

def _login_ssh(self):
"""
Expand Down

0 comments on commit c58de4f

Please sign in to comment.