[Z2M] Aqara Opple 4 boutons blueprint (WXCJKG12LM) [Updated 2025]

I’ve had the same problem as people above - and I discovered the problem. The automation has this as a trigger:

trigger:
  - platform: state
    entity_id: !input "switch"
    attribute: action

But (and I’m not sure if this is a change in zigbee2mqtt or HA since this blueprint was written), but the sensor attribute which changes state to mark the MQTT even doesn’t have and attribute called ‘action’; it only has a state. Therefore, the automation is watching a non-existent attribute and never fires.

Removing the attribute: action line makes the automation work.

Hello @thecowan ,

Thanks a lot for pitching in in this.

That doesn’t explain why it works like a charm on my end. I’ll try to do the change on my side when I get out of work and test it. Then I’ll publish the template edited if everything works all right.

Hello again @thecowan ,

If I remove attribute:action on my end, the automation stops working all together.

It makes sense, since my sensor does have an action attribute.

From playing around more, I think this depends on whether you have “Home Assistant legacy entity attributes” set in the zigbee2mqtt config. If you do, you have an action attribute; if not, it’s kept purely in the state. I think.

1 Like

If you want to eliminate the null triggers from firing the automation thus causing errors in the log, add a condition to only allow the ‘good’ triggers to get into the blueprint guts and screen out the nulls and everything else in the condition…

I explained that to someone else here:

Hi all,

this might be a really dumb newbie question but I hope you don’t throw tomatoes at me now:

I imported this blueprint. I have an Opple WXCJKG12LM joined over deCONZ and showing up under “devices” and I can actually use it to trigger stuff (but without a blueprint of course rather unstructured).
But if I want to create an automation with this blueprint here, I can not select the Opple switch - the dropdown shows “no matching entities found”.

How can that be - the device is visible under “devices”?

I have the same thing also with another Aqara Switch (WXKG11LM) and it’s respective blueprint…
It seems my HA doesn’t recognize those devices as being what the blueprints are for.

Am I missing something here?
Thanks for your help!

Jan

I will look into this! Whenever I have some free time… doesn’t come that often lately.

Thanks

Hey @jan7 ,

“There are no stupid questions” Quoting someone that is surely cleverer than me.

The Z2M at the beginning of the blueprint, stands for Zigbee2MQTT. When you mention deConz, you are talking about the AddOn right?

In that case, it’s probably the cause of your issue. You need to find a blueprint compatible with that app… which doesn’t seem to exist… or I’m really bad at searching :smiley:

Sorry mate

EDIT: Nevermind am just bad… here try this template

1 Like

Aaaaaahhh!
Major revelation here!

It did never occur to me that there might be a dependency that certain blueprints only work with certain Zigbee-Usb-Sticks / their AddOn.

That solves the mystery!
Thanky you very much! And it wasn’t even your blueprint :slight_smile: Thanks!

1 Like

This dependency is solely based on the way the Addons work.

Deconz seems to be using specific events to show actions on the devices, while Z2M just relies on MQTT messages.

Since the above is the trigger to the whole automation it makes sense.

Happy new year everyone!!

I’ve updated this to reflect changes in home assistant since 2022

The blueprint changes drastically as you only have to chose a Device instead of an entity

Layout has been made easier to administrate, at least IMHO

Take care

1 Like

You may want to add a my link to help the directory location challenged individuals…
Create a link – My Home Assistant

1 Like

By any chance have a six button blueprint too?

Hey @mhoogenbosch ,

I didn’t make one as I don’t have a device to test it with.

If you can test it for me, I’m happy to make one

Give me the 15-20 min and I put it online

Chris

2 Likes

six button (three band) version here.

Trying to import the 4 button version, but I’m getting the following error:

mapping values are not allowed here in "<unicode string>", line 13, column 54: ... or" media="(prefers-color-scheme: light)" content="#03a9f4"> ^

I’ll check this tonight, dad duties first !!

Those are the most important!

@DSLeX typo fixed for the 4 bouttons too.

Did you have any issue importing this like @mhoogenbosch ?

I guess so, but am unable to test because of the import error. Tried it again, but getting the same error message.