From 31fbfed0a6e1c8fbae0cd3b0ec60aefd59461bb5 Mon Sep 17 00:00:00 2001 From: Sebastian Muszynski Date: Mon, 13 Aug 2018 08:17:15 +0200 Subject: [PATCH] Fix magic cube support of the Aqara LAN Protocol V2 (#15940) --- 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 2a9746b4a01..f53d07f2995 100644 --- a/homeassistant/components/binary_sensor/xiaomi_aqara.py +++ b/homeassistant/components/binary_sensor/xiaomi_aqara.py @@ -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,