Return on_since only when its available and the device is on (#48)

* moves on_since property to smartdevice class, as it is not plug only
* returns None if the value is not available (some bulbs), or if the device is off
This commit is contained in:
Teemu R
2020-04-24 16:47:57 +02:00
committed by GitHub
parent fd560442a2
commit 0c71957aa8
5 changed files with 54 additions and 26 deletions

View File

@@ -98,7 +98,6 @@ def dev(request):
if ip:
d = asyncio.run(Discover.discover_single(ip))
asyncio.run(d.update())
print(d.model)
if d.model in file:
return d
return