Skip to content

Commit

Permalink
Fix Bad Coding in Modem Sync_Add and Sync
Browse files Browse the repository at this point in the history
Two errors.  One was a holdover from when I tried logging inside
command sequences.

The other is caused by the different arguments for add_on_device
between devices and the modem.

Fixes TD22057#192
Fixes TD22057#193
  • Loading branch information
krkeegan committed Feb 18, 2020
1 parent 868543c commit 9379418
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions insteon_mqtt/Modem.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def sync(self, dry_run=True, refresh=True, sequence=None, on_done=None):
for entry in diff.add_entries:
seq.add(self._sync_add, entry, dry_run)
else:
seq.add(LOG.ui, " No changes necessary.")
LOG.ui(" No changes necessary.")

if sequence is None:
seq.run()
Expand Down Expand Up @@ -694,9 +694,7 @@ def _sync_add(self, entry, dry_run, on_done=None):
on_done(True, None, None)
else:
LOG.ui(" Adding %s:", entry)
self.db.add_on_device(self.protocol, entry.addr, entry.group,
entry.is_controller, entry.data,
on_done=on_done)
self.db.add_on_device(self.protocol, entry, on_done=on_done)

#-----------------------------------------------------------------------
def sync_all(self, dry_run=True, refresh=True, on_done=None):
Expand Down

0 comments on commit 9379418

Please sign in to comment.