This blueprint is one of several that addresses the challenge of creating actions for ‘remote-control’ devices. The Aqara Cube can have as many as 32 actions (5 events x 6 sub-events = 30 + 2 events). Most of the work is defining the actions.
For the curious, here’s how it could be done without a blueprint.
Create a script for each action and name each script using a consistent format. For example:
script.cube1_flip_3
That means it’s the script for the sensor called cube1 when its event isflip and its sub-event is 3.
Make as many scripts as you need for each cube, which means up to 32 scripts for a single Aqara Cube (it’s the same amount of work as filling out a blueprint).
This one short automation handles all actions for two Aqara Cubes:
I want to look at that, but it is difficult for me to test this customization. Do you have an example of another automation in which you have been able to circumvent this problem? Do I understand correctly that you are using 2 coordinators in the same zigbee network and publishing in the same mqtt topic?
Thanks for great blueprint! Sadly I’ve faced an issue - laggy turning actions.
I’m using these to dim/brighten my mesh lights with zigbe2mqtt and Conbee II stick. With ZHA I had it with queued option seted to 5 and it was working fast and accurate. Now it’s roulette if the lights will dimm or not. Sometimes no reaction at all and sometimes it goes with all delayed actions. In general this should dim/brigten different lights based on side action. Any tips?
Thanks in advance!
hi thanks for sending this feedback. During testing, I noticed that it does not always go smoothly. With the adjustment you mentioned (queued option set to 5) it seems to be going better.
I will update the blueprint, you could test whether it is better for you?
Hi!
Thanks a lot for quick action. I’ve tested your new version but still facing delays and no action at all.
My default setup is:
side:0 turning cw/ccw is adjusting brightness of lamp 1,
side:3 cw/ccw is adjusting brighness of lamp 2
and accordingly:
side:0 tap toggles on/off for lamp 1 and side:3 toggles on/off for lamp 2.
Issues I’m facing:
toggle light is not working somehow, lights are just flashing once and turning off again (Have to use light.turn_on),
actions are not taken at all or with huge delay (all of these),
random actions are working (increasing brigtness is working but reducing not).
HA log shows that action is taken and automatization is released but nothing happen (I’ve noticed that for one automatization released there is quite some entries - I will provide screenshot) and Zigbee2MQTT log is also showing that actions are registered. I have Hassio running on Raspberry Pi 4 with 4GB RAM and maybe that is the reason why is so laggy? From the other hand when I was using cracked Xiaomi Gaterway 3 with ZHA actions were taken almost immediately but I really want fancy option to dim different lights according to cube side
I will test in a moment if Cube connected to Xiaomi Gateway with ZHA is working faster and if ordinary automatization just for one action a time is also giving better results.
sorry to hear that it is not working properly yet. I cannot reproduce the problems you describe and it seems to work well here with a similar automation: Turn to dim (side-0) and Shake or fall to turn off.
In your first post your problems sounded worse than I was experiencing and also immediately wondered if there might be some other cause such as overloaded hardware. Hopefully you have the option to rule this out somehow and maybe someone else can check this out
I see the same issues with light.toggle, it flashes and returns to the original state. It appears to be specifically z-wave devices for my setup, zigbee/wifi lights don’t experience it. I can issue the same light.toggle service call from the HA console and it works as expected, seems like something subtle is going on here. Just wanted to add my 2c.
The problem is that this automation sends the action 2 times. With scripts happen the same it executes them two times., if you have a toggle script it doesn’t work.
I also find a double action when setting toggle - thanks for this, its enabled me to get going and great fun, I wouldn’t have known how to use it otherwise, appreciated!
This blueprint requires an entity in the first GUI field.
Z2M does not expose an action entity for me, with several tries to re-pair.
How to add the cube to this blueprint then?
Which code block did you use? the blueprint was untested. when i think about it, with platform: event, there is no trigger.from_state object, so my blueprint codeblock cant work. i need for that more than 5 minutes to rewrite the blueprint. i try to have a look on it tomorrow…