Seems to work flawlessly with my buttons. The only improvement I could come up with for now is that adding the line integration: mqtt under entity for the input device will limit the number of selectable sensors.
The first section would then look like:
blueprint:
name: Aqara Wireless Switch
description: 'Control anything using Aqara Wireless Switch'
domain: automation
input:
switch:
name: Switch
description: Action sensor of Aqara Wireless Switch to use
selector:
entity:
domain: sensor
integration: mqtt
Can you please check if really no change has been made to the file? I just compared the different versions of the code and other than the changes I wanted to make no differences are present.
To be honest with you I very recently made the switch from Zigbee2MQTT to the native ZHA integration so I cannot fully verify functionality. But since I switched I just changed this line:
Could you describe again a little more precisely what you want to do? This blueprint is designed to match the return commands of the entity created by Zigbee2MQTT
As I don’t own a switch that sends the long-pressed command I can’t help you on this one either. But are you sure that it does send that command to Zigbee2MQTT? Or do you want me to integrate another command from a button into this blueprint?
Yes, i’m sure. it sends the “release” command when the button was released and then you can build an automation on duration the button was hold. for example hold 3 seconds = turn off single light, hold 5 seconds = turn off all light.
I solved it like this:
sorry I’m a newbie in HA. I’ve set my HA on a raspberry soon, with zigbee2mqtt. It works fine.
I’ve just bought an aqara switch [WRS-R02] Xiaomi WRS-R02 control via MQTT | Zigbee2MQTT with 2 buttons. It’s supposed to have single, double, long press … actions but when I try to add an automatisation, the only actions I have are : button1_single/triple, button2_single, toggle1.
Does this blueprint can help me? I’ve searched in this forum and zigbee2mqtt but I didn’t found anything good.
Hi @bertrand, glad to have you on board with HA
I’m sorry, but this blueprint won’t do for you. I designed it specifically for the button above. You’ll probably have to write your own blueprint. After a quick search, I found this blueprint, which is only for ZHA, but could serve as an example for a Xiaomi switch with two buttons. Combine it with this blueprint and it should quite easily do the trick.
Sorry for the late answer. I sadly cannot help you with the blueprint, as I changed my setup. I know that it used to work but don’t know if they changed something fundamental about blueprints…
I came across this while migrating from ZHA to Zigbee2MQTT and debugged the issue for why it wasn’t working. You can remove the “attribute: click” line in the trigger as the single/double/etc action is stored in the main state. With that change, it should work.
I hope that someone can help : I am trying to use the blueprint to control a number of lights/group of lights together
“single” action → light.turn_on for all of the individual lights devices or the group entity
“double” action → light.turn_off for all of the individual lights devices or the group entity
Everythig works well with this blueprint as long as there is only one device to control.
As soon as there is a group of lights or multiple individual lights devices (even calling up a scene or a separate automation that control >1 light) it no longer works well ?
Am I the only one in this situation ?
I have checked that the action reports correctly in mqtt_explorer and in the log.
When manually running the light.turn_on from a group of lights everything works well but if that same action on a group of light follows the wirelss switch action trigger it no longer works ???
Am I really the only one in this same situation ?
Have others tried to control more than one device using the blueprint action trigger ?
@Sommer@IamMattM I officially changed the mode reflecting the feedback you gave. I switched to ZHA so I cannot verify the change but maybe you can give me a feedback. Thanks in advance!