Trouble with Xiaomi Aqara smart wireless smart switch

Hi oly two weeks into my Home Assistant journey and I’m learning a lot but have trouble with my Xiaomi setup I’ve got about 80% up and working including my zigbee light switch but I cannot seem to get the WXKG02LM wireless smart switch working it shows up as an entity but does not show state changes when I use the switch, anybody had the same problems any help would be appreciated. Sorry issue solved noob mistake

I use an Aqara wireless wall switch as a remote switch for lights which are connected to an Aqara zigbee light switch. This is my automation:

- action:
  - data:
      entity_id: switch.wall_switch_158d0001333bf1
    service: switch.toggle
  alias: Wireless Upstairs Light Switch
  condition: []
  id: '1520863284599'
  trigger:
  - event_data:
      entity_id: binary_sensor.wall_switch_158d00013e7dc3
    event_type: click
    platform: event

The wireless switch is “binary_sensor.wall_switch_158d00013e7dc3” and the automation uses event_type: click to toggle the actual wall switch “switch.wall_switch_158d0001333bf1”

Thanks for the information Martin, integrating the Xiaomi stuff was one of the reasons for getting into Home Assistant in the first place.

1 Like

I have several Xiaomi devices including one of these double wireless wall switches. I cannot see state changes with the wall switch but the round button works. I’m using the round Xiaomi button as a doorbell and it works great.

binary_sensor.wall_switch_both_158d000163e619	off	last_action: null
battery_level: 35
friendly_name: Wall Switch (Both)_158d000163e619
binary_sensor.wall_switch_left_158d000163e619	off	last_action: null
battery_level: 35
friendly_name: Wall Switch (Left)_158d000163e619
binary_sensor.wall_switch_right_158d000163e619	off	last_action: null
battery_level: 35
friendly_name: Wall Switch (Right)_158d000163e619

As you can see, last action is ‘null’. The switch works with the gateway and the gateway chimes when I push either the left or right button but I do not see state changes in Hassio. Should I for this switch?

I spent a lot of time thinking the switches didn’t work, but they work as a momentary switch so they have no on and off state.

Hey @xbmcnut My Thread here: Automation with Xiaomi Aqara Wireless Switch (Double) Switch Might help you as I have my code that does detect the clicks of that type of switch. But with that said I’ve been having some issues with the Xiaomi Gateway talking with the HASS.IO from what I can tell it seams there has been a update to the Xiaomi Gateway a month or two ago and HASS has not been updated accordingly as yet.

Hmmm. I thought I would see a state change in the dev console as I do for the PIR and round button but I’ll try adding code to create an automation and see what happens. It’s a shame these don’t come in a US/AU/NZ format.

Thanks. I’ll check that out.