deCONZ - Fix magic cube awake gesture (#31403)
parent
55a1bf3832
commit
704cfcf235
|
@ -50,7 +50,7 @@ class DeconzEvent(DeconzBase):
|
|||
CONF_EVENT: self._device.state,
|
||||
}
|
||||
|
||||
if self._device.gesture:
|
||||
if self._device.gesture is not None:
|
||||
data[CONF_GESTURE] = self._device.gesture
|
||||
|
||||
self.gateway.hass.bus.async_fire(CONF_DECONZ_EVENT, data)
|
||||
|
|
|
@ -101,7 +101,7 @@ async def test_deconz_events(hass):
|
|||
mock_listener = Mock()
|
||||
unsub = hass.bus.async_listen(CONF_DECONZ_EVENT, mock_listener)
|
||||
|
||||
gateway.api.sensors["4"].async_update({"state": {"gesture": 2}})
|
||||
gateway.api.sensors["4"].async_update({"state": {"gesture": 0}})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert len(mock_listener.mock_calls) == 1
|
||||
|
@ -109,7 +109,7 @@ async def test_deconz_events(hass):
|
|||
"id": "switch_4",
|
||||
"unique_id": "00:00:00:00:00:00:00:04",
|
||||
"event": 1000,
|
||||
"gesture": 2,
|
||||
"gesture": 0,
|
||||
}
|
||||
|
||||
unsub()
|
||||
|
|
Loading…
Reference in New Issue