Skip to content

Commit

Permalink
Fix magic cube support of the Aqara LAN Protocol V2 (#15940)
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi authored and Danielhiversen committed Aug 13, 2018
1 parent b7486e5 commit 31fbfed
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions homeassistant/components/binary_sensor/xiaomi_aqara.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,13 @@ def parse_data(self, data, raw_data):
})
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,
Expand Down

0 comments on commit 31fbfed

Please sign in to comment.