Add device_id property, rename context to child_id (#15)

For regular devices, device_id is the mac address and for child devices it is a combination of the mac address and the child_id.
This commit is contained in:
Teemu R
2020-01-13 00:17:45 +01:00
committed by GitHub
parent 524d28abbc
commit 0f0df481a0
4 changed files with 43 additions and 51 deletions

View File

@@ -79,7 +79,7 @@ class SmartStrip(SmartPlug):
SmartPlug(
self.host,
self.protocol,
context=child["id"],
child_id=child["id"],
cache_ttl=self.cache_ttl.total_seconds(),
ioloop=self.ioloop,
)