This blueprint adds support for rotating the cube per specific side, by using an Input Number helper to track the side that was last activated by a side-specific action (flip, slide, knock).
Note that since this blueprint uses an input number helper to track which side is active, it will only register side changes from valid side actions (again, flip/knock/slide). If you lift the cube, rotate it freely, and then place it down on a different side, this is not registered as a valid action and the tracking variable won’t be updated.
The input number helper will need to be created independently in HomeAssistant, by going to Configuration → Helpers in the UI and adding a new Number helper.
Supported actions
Slide
Knock
Flip 90 degress
Flip 180 degress
Flip to specific side
Shake
Drop
Wake
Rotate clockwise
Rotate counter-clockwise
Rotate per side
Here’s a sample automation that will call out the side using Alexa media player TTS when flipped, and will adjust brightness of office lights based on the relative degree of the rotation (thanks brent!) but only for face 1:
Hey this looks like it will do exactly what I am looking for. I am however very new to HA and was wondering if you could just give me an example how the number helper would work. What lines were required etc. I am a once I see it I can understand how to do the rest but the big thing is tracking the sides which is the big functionality.
Thanks very great work!
I have tested for rotate face and it works but if try to use knock face option seems to not work.
There is some special flag to use “knock” face feature?
Thanks so much
You can create an input number helper in HomeAssistant’s UI. Just go to Configuration → Helpers and create a “Number” helper. You can then reference this in the automation in the UI.
The knock detection on the cube is kind of flaky - I find that I have to pick up the cube and then hit it against the desk 3 times to trigger it somewhat consistently.
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
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
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?
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
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
@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?
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.