[Z2M] Aqara Opple 4 boutons blueprint (WXCJKG12LM)

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.