Hi all,
Recently I integrated a Xiaomi Mi control hub into my Home assistant set-up. I connected both an ‘Aqara Wireless Remote Switch - double rocker’ and an ‘Aqara Motion Sensor’. It took some fiddling around (because of my inexperience), but I got it working nicely.
I am using Home Assistant 0.83.2 running on Hassbian.
However, for some reason (i.e.I changed the name of the device within HA, updated HA, another reason?), the switch is not working anymore.
I have noticed:
- the switch actions are still shown in the mi-home app (so the switch itself is working)
- the gateway itself is connected correctly to home assistent (I can activate the gateway light and the motion sensor is used in an automation and works fine)
- the switch actions do not update the ‘last action’ anymore in the HA interface
- If I press the switch buttons, I am seeing a response in the log files (with debug mode on), so the switch action is being received by HA.
- If I trigger the automation manually from HA, it is correctly turning on the Gateway light.
I have configured the gateway with the following configuration:
xiaomi_aqara:
discovery_retry: 5
gateways:
- key: xxxxx
These are the relevant lines in the logging:
2018-12-08 13:51:16 DEBUG (Thread-24) [xiaomi_gateway] MCAST (report) << {‘cmd’: ‘report’, ‘sid’: ‘158d000254cd7a’, ‘model’: ‘86sw2’, ‘short_id’: 15551, ‘data’: ‘{“channel_0”:“click”}’}
2018-12-08 13:51:16 DEBUG (MainThread) [homeassistant.components.xiaomi_aqara] PUSH >> <Entity Wall Switch (Both)_158d000254cd7a: off>: {‘channel_0’: ‘click’}
2018-12-08 13:51:16 DEBUG (MainThread) [homeassistant.components.xiaomi_aqara] PUSH >> <Entity Wall Switch (Right)_158d000254cd7a: off>: {‘channel_0’: ‘click’}
2018-12-08 13:51:16 DEBUG (MainThread) [homeassistant.components.xiaomi_aqara] PUSH >> <Entity Wall Switch (Left)_158d000254cd7a: off>: {‘channel_0’: ‘click’}
2018-12-08 13:51:16 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event xiaomi_aqara.click[L]: click_type=single, entity_id=binary_sensor.wall_switch_left>
I am trying to use the left switch in an automation with the following configuration:
#Wandschakelaar links - id: 'Wall Switch left' alias: Wall Switch left trigger: - event_data: click_type: single entity_id: binary_sensor.wall_switch_left event_type: click platform: event action: service: light.toggle entity_id: light.aqaragateway
Does anyone have an idea how to further research/fix this? I am stuck.