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

@@ -76,7 +76,7 @@ class SmartBulb(SmartDevice):
self,
host: str,
protocol: TPLinkSmartHomeProtocol = None,
context: str = None,
child_id: str = None,
cache_ttl: int = 3,
*,
ioloop=None,
@@ -85,7 +85,7 @@ class SmartBulb(SmartDevice):
self,
host=host,
protocol=protocol,
context=context,
child_id=child_id,
cache_ttl=cache_ttl,
ioloop=ioloop,
)