diff --git a/devices/protocols/Tuya/xaal/tuya/devices.py b/devices/protocols/Tuya/xaal/tuya/devices.py index 9b4f3a127e58ce46124123c42bbe86b4980624f1..b4b190c6d49ca9f2a81c0113048d2832e38e72d7 100644 --- a/devices/protocols/Tuya/xaal/tuya/devices.py +++ b/devices/protocols/Tuya/xaal/tuya/devices.py @@ -147,8 +147,20 @@ class SmartPlug(PowerRelay): PowerRelay.setup(self) # related power relays pmeter.attributes['devices'] = [k.address for k in self.devices[1:]] - + + def debug_dps(self, dps): + k_dps = list(self.dps_to_dev.keys()) + k_dps = k_dps + self.pmeter_dps + r = '' + for k,v in dps.items(): + if k not in k_dps: + r = r + f"'{k}'->{v} " + if len(r) > 0: + logger.info(f"{self.tuya_id} unknow DPS: {r}") + def on_dps(self,dps): + if self.debug: + self.debug_dps(dps) PowerRelay.on_dps(self,dps) pmeter_attr = self.devices[0].attributes # current