From fdf4a2d60b275a597e468ec9bb63e62236b999ae Mon Sep 17 00:00:00 2001 From: Sebastian Muszynski Date: Sun, 12 Aug 2018 15:48:06 +0200 Subject: [PATCH] Fix magic cube support of the Aqara LAN Protocol V2 --- homeassistant/components/binary_sensor/xiaomi_aqara.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/homeassistant/components/binary_sensor/xiaomi_aqara.py b/homeassistant/components/binary_sensor/xiaomi_aqara.py index be5d9a689d1194..87ff41e9890874 100644 --- a/homeassistant/components/binary_sensor/xiaomi_aqara.py +++ b/homeassistant/components/binary_sensor/xiaomi_aqara.py @@ -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,