From 93794186c7f45468fce7e2db3d1b755d35826cd1 Mon Sep 17 00:00:00 2001 From: Kevin Keegan Date: Tue, 18 Feb 2020 10:54:35 -0800 Subject: [PATCH] Fix Bad Coding in Modem Sync_Add and Sync 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 #192 Fixes #193 --- insteon_mqtt/Modem.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/insteon_mqtt/Modem.py b/insteon_mqtt/Modem.py index 33d1cd7d..e838713c 100644 --- a/insteon_mqtt/Modem.py +++ b/insteon_mqtt/Modem.py @@ -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() @@ -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):