Track deCONZ lib changes to light based devices (#43366)

* Improve control of covers

* Log backtrace if available

* Do not create entity for controller tool
Binary sensor should use state rather than is_tripped
Add some more tests to lights and sensors

* Bump dependency to v74

* Fix Balloobs comments
This commit is contained in:
Robert Svensson 2020-11-23 11:37:11 +01:00 committed by GitHub
parent 3b105c415b
commit 55cbd5aa0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 206 additions and 52 deletions

View file

@ -75,14 +75,12 @@ class DeconzSiren(DeconzDevice, SwitchEntity):
@property
def is_on(self):
"""Return true if switch is on."""
return self._device.alert == "lselect"
return self._device.is_on
async def async_turn_on(self, **kwargs):
"""Turn on switch."""
data = {"alert": "lselect"}
await self._device.async_set_state(data)
await self._device.turn_on()
async def async_turn_off(self, **kwargs):
"""Turn off switch."""
data = {"alert": "none"}
await self._device.async_set_state(data)
await self._device.turn_off()