Fix magic cube support of the Aqara LAN Protocol V2 (#15940)

pull/14257/merge
Sebastian Muszynski 2018-08-13 08:17:15 +02:00 committed by Daniel Høyer Iversen
parent b7486e5605
commit 31fbfed0a6
1 changed files with 7 additions and 0 deletions

View File

@ -378,6 +378,13 @@ class XiaomiCube(XiaomiBinarySensor):
})
self._last_action = data['status']
if 'cube_status' in data:
self._hass.bus.fire('cube_action', {
'entity_id': self.entity_id,
'action_type': data['cube_status']
})
self._last_action = data['cube_status']
if 'rotate' in data:
self._hass.bus.fire('cube_action', {
'entity_id': self.entity_id,