Aqara Cube ZHA - Simplified face-based device control

That is simply an action sensor called by te zigbee stuff. It’s a Home Assistant script.

If ZHA has the angle as an attribute, that is the input and the rest should be close.

1 Like

I was about to try Z2M when I got this cube and couldn’t find so much material, but in the end I invested a bit more time to learn a bit more on how to work with events and discovered I can have very similar capabilities with ZHA, with an smoother user experience, so I decided to stay.

Maybe I can help you here… What you want is that Blueprint converted for ZHA?

1 Like

On my Blueprint I don’t take in account the “from” side, I just use the side the needed showing up after each action.

1 Like

@EdwardTFN @Sir_Goodenough

Sometimes simplicity the best solultion, I can guarantee you that if I start talking about angles to control devices with my wife, she is going to through that cube out the window.

I think in my household, I will be using both your blueprints :smiley:

thanks again for your awesome dev work here!!

1 Like

From side that were not flip actions was fun. I happened to notice that if you were really careful you could get it into that mode. It is completely impractical, however. Not useful beyond a ‘secret’ way to activate a trigger for something…

I mostly added it so I could say there were over 100 ways to trigger it… (albeit some ridiculous…)

Anything anyone wants to take from my code into their code go right ahead. Attribution is nice but not required…

If someone can think of a tweak for mine suggest away.

1 Like

Of course any copy of your Blueprint will require giving you the credits.

My point is more that “convert” a Blueprint originally designed to Z2MQTT in a way it can work with ZHA is not a big issue.
And I’m not sharing my Blueprint to compete with other Blueprint. I’m doing this in order to support someone who could have a similar use case that I had. It is a collaboration mindset, not a competitive mindset.
And if someone need help converting an existing Blueprint designed to Z2MQTT into a ZHA Blueprint I can help. :wink:
I’m not gonna offer to do the opposite by the simple fact that I don’t have a Z2MQTT environment to run my tests.

Go for it. Glad to share.
I have an old sonoff Zigbee V1 brick that someday I’m going it install ZHA for testing and porting stuff, but It hasn’t happened yet. Maybe late fall. So go right ahead.

1 Like

Flip degrees is 90, 180 and not the rotation degrees

That’s right, @mouth4war, the rotation will be on relative_degrees, which I think is not included in this Blueprint. Thanks for catching that.

        "command": "rotate_right",
        "args": {
            "relative_degrees": 76.14999389648438

I will take a look if I can add this info to the blueprint.

Ok, the value is available on trigger.event.data.args.relative_degrees. I’ve added this to the blueprint.

1 Like

Noticed a bug. When I double tap on face 2 it changes the helper to 5.

1 Like

Hi @mouth4wa, are you sure about this? I couldn’t reproduce what you are saying and basically the blueprint will use the face info it is receiving from the event.

The face numbering is a but tricky and I believe the best representation I found was this on from this other Blueprint: ZHA - Aqara Magic Cube (57 actions), which is also just using the info received by the event (from the Zigbee integration).

Ive reported an issue for the face reporting on knock events.

1 Like