ZHA - Aqara Magic Cube (69 actions)

Any reason that an action can’t go against an entity instead of a device. I have some zigbee groups that I would like to use this on. But can’t get the action down. Thanks

As far as I can tell, the cube doesn’t expose entities that can be used for automations when added to ZHA.

Dear Rahul,
from some time (i can not be sure…sorry) the feature of “Slide - Side X up” seems not working as we expected.
If we look on “active_face_entity” (the helper entity) i can see the right side but as soon i slide the cube the active_face_entity will change with a different number for instance: if i’m on face n.2 and i slide the cube the “active_face_entity” will be n.5.
Maybe something is changed on homeassistant release (i’m in 2021.12.7).
Thanks so much for your help

1 Like

Thank you for your reply, Rahul. I am looking for a way for the blueprint to perform an action on any entity. So in my case I have the cube and the blueprint, and I want to turn on a zigbee group. There doesn’t seem to be a way for me to define the zigbee group (which is an entity) in the Blueprint. AmI missing something?

Thank you!

I have fixed my problem with a change to those Blueprint lines (bold value):

activated_face: |

    {% if command == "slide" or command == "knock" %}

      {% if trigger.event.data.args.activated_face == 1 %} 1

      {% elif trigger.event.data.args.activated_face == 2 %} **2**

      {% elif trigger.event.data.args.activated_face == 3 %} **3**

      {% elif trigger.event.data.args.activated_face == 4 %} 4

      {% elif trigger.event.data.args.activated_face == 5 %} **5**

      {% elif trigger.event.data.args.activated_face == 6 %} **6**

Now it seems to work as expected but why? :slight_smile:
Thanks so much

5 Likes

Hi, by using this blueprint I develop my one in a much simpler approach (only 24 actions, 6 sides * [rotate, flip, knock and slide])

ZHA - Aqara Magic Cube (24 actions)

Hey,

First of all thank you for providing this blueprint. I’m still not sure what different actions I will program because it will be hard to remember them all :smiley:

I’m trying to use the rotate left and right actions to change the color temperature of a light (like dimming). This is the YAML that I tried

      rotate_left_side_1:
      - service: light.turn_on
        data_template:
          color_temp: "{{ state_attr('light.glas', 'color_temp') - 20 }}"
        target:
          device_id: bd2742b4f7d475d7e876ca73bc305d74

Unfortunately this isn’t working. Any ideas why?

Thanks.

when creating the input helper, do I only need to give it a name and save it with all the other default values?

@rvaidya Amazing blueprint! I love it! I ran into a bug though. If I create a new automation from the blueprint it works perfectly. However if I try and edit the automation later the toggle switches won’t save if I change them (slide any, rotate any, etc.). Am I doing something wrong?

That is an HA Bug I believe…
There is an issue for that.

1 Like

Good to know, thanks!

FYI: I was struggling to get this automation blueprint for my aqara cube working after a recent HA update (currently running 2022.7.7) . I finally realized I didn’t need the blueprint anymore because the cube device now generates events that can be used for automation without the blueprint.

Yes, it always did that. Otherwise the Blueprints would not work.

Does anyone know the parameters to execute a “drop”?

1 Like

Thanks, it was really helpful :slight_smile:

Thanks a lot for this blueprint!! I had to change the light dimmer from relative degrees to percent. it was the smoother and better “flow” for my hue lights. ( I’ve found the solution here in the HA forum.
Now i would like to do the same for the volume of my Onkyo Receiver, because relative degrees change the volume much to fast/hard. does someone know , how i can do this? Sorry, i’m a noob :wink:

If you look in my blueprint, I ‘scale’ the angle to 0.4 (40%) of the actual. This makes the response usable…
Should be able to do the same instead of converting things to percents of something…

This is a link directly to the ‘dimmer’ section of my blueprint.
There is also a color change using rotation and a short-press / long-press using rotation there.

1 Like

Hey ! Thanks a lot. quick question the rotate per side and the shake work every time but the Rotate to specific side work like one time out of ten. is there something i can do to fix it ?

Thanks a lot. For your support/link…but can i use your dimmer script also for the mediaplayer volume? But i’ll teat your blueprint anyway :wink:

There are 6 sides on the cube… @Slaytanic

1 Like