🧯 ZHA - Xiaomi Cube Controller

Hi, thanks for your impressive work and documentation!

I have the problem that i can’t switch the mode. I’am in Scene mode and tried so many ways to switch it. I tried it paired, unpaired, wait 5 mins. Nothing works.

I’am Using ZHA, with Sonoff ZDBDongle-E (the newer verion and not P). I can see all the actions when I configure an automation, just the events are not fireing. Only rotate and shake.

Does anyone has a tip?

Edit: I just saw that slide is working too but battery is unknown

I would do this paired and with my event sensor running so that you know what mode it’s in, but this instruction is what the manual says for the cube and has always worked for me…

thanks for the fast answer. I found the Solution. You need to first give up :smiley:
After sync, i just let the cube alone for half an hour. Then i pressed the button shortly. Pretty sure that this was not important. I think the soulution is to wait a long while after sync. 5 Mins was for sure not enough.

1 Like

I have the Cube T1 Pro (connceted with ZHA and skyconncet).

My aqara can shake and rotate, filp, slide but can’t knock.

I should be in the right mode (if i change mode i can only rotate and shake).

Sometimes if you don.t delay long enough between moves, the move won’t register. make sure there is a 1 or 2 second pause right before the knock.
Plus you have to be doing the knock right. There’s a video above of how to do it.
Finally id you add the event sensor and put the sensor entity on your dashboard, you will see what the blueprint thinks your move was. That will help with training.
Foe ZHA figuring out the mode is a pain. Yoyu probably have to look at the zha events or in the lohistory for the device to see if scene or action mode.

thanks for your advices.
I’ve try to wait but i can’t still knock.
I’ve also try to update the firmware of skyconnect but nothing changed.
Is it normal that i see all the move in the regiter as “face any”. It can’t detect (for example) slice face 1, slice face 2, ecc.

I could try buing another dice but i think is my configuration the problem

If you would like to read my instructions again, I’m sure this is the problem…


Put it into action mode, it is the only mode that works properly on ZHA and the people that set-up the zigpy device registry have not made a proper interview device for this cube. Complaints would need to be registered there…
(It all works fine in Z2M, BTW)
The T1 pro Cube is missing new functions that are available in the device. · Issue #2145 · zigpy/zha-device-handlers · GitHub. to thumb up this to possibly get this fixed…

1 Like

Thank you again. I thought that listening the event from ZHA was fine.
In the dev tool i see the face of the dice and i was able to see a knock too

But only one (i wasn’t able to repruduce it).
I haven’t find the video that show how to knock the dice (i’ll try again).

Thanks again

🧯 ZHA - Xiaomi Cube Controller.

Direct link

I was looking at @Hybrego 's issue - and mine sounds very similar. I believe I’ve swapped to Action mode, as triggering 5 presses alters the behavior - no flips will register in the events.

I’ve re-read your comments, but my understanding is that Scene mode would only reflect rotate & knock, not the slide/flip which we currently see?

I’ve also posted to the subreddit, if the signature would be hlepful. https://www.reddit.com/r/homeassistant/comments/18u86ke/aqara_t1_cube_faces/

When I view the trace -

And the event log, due to new-user upload limits:

Are you using my blueprint? Those logbook entries don’t look familiar.

Also I recommend only the action mode for ZHA. The interview profile is too far off for the scene mode to be functional in ZHA. There is a link above to the zigpy issue asking for this to be fixed and I would appreciate everyone giving it a thumbs up or finding someone that can figure out how to change the interview for this cube. Scene mode on this cube is broken, and the action mode is handicapped with a couple of functions missing and a couple of others not available.

It really only works properly in Z2M.

Well, feeling dumb. User Error.

I was 100% using your blueprint at the end - but I had loaded at least 4-5 others during testing of various issues. Reloading my configs, issue resolved - yours fires events as set up.

The Logbook still only shows the “face any” event, but the correct changes occur.

As the docs say, you can add the template sensor and pull that sensor to the dashboard to see what the blueprint thinks is happening real time. It helps a lot when setting things up.

I can’t get tis working


  • trigger:
    • platform: event
      event_type: cube_last_action
    • platform: event
      event_type: zha_cube_last_action
    • name: “Cube Last Action”
      unique_id: cubelastaction
      icon: mdi:eye-refresh-outline
      friendly_name: “Cube Action”
      state: >
      {{ trigger.event.data.friendly_name }} -
      {{ trigger.event.data.action }} -
      {{ trigger.event.data.side }} frm
      {{ trigger.event.data.last_side }}Preformatted text

state unavailable what do I need to do to fix this sensor code

Perhaps could you edit that for me do lit looks like it does on your screen?
It may be a matter of indenting or something.
How to help us help you - or How to ask a good question.

It should be looking exactly like this, and I’m thinking you have sensor: indented wrong.
HA_Blueprints/Samples/Cube_Last_Action_Template_Trigger_SAMPLE.yaml at c05d6fb431c1d84cb145c7d6dd5ffe5a60b1d9e2 · SirGoodenough/HA_Blueprints · GitHub.

thanks but I tried to put that code in my templates.yaml and got errors so I download your yaml file and uploaded it to home assistant folder it creates sensor but still says unavailable ill keep trying I would love this working maybe ive miss something

According to what you have above, you did not copy it correctly. The indentation is off, and this is very important.
See what mine in my working config file looks like:
Home-Assistant-Config/templates/trigger/ZHA Cube Last Action.yaml at d0068d87b4036406bb6a19d257bf6cf695331c85 · SirGoodenough/Home-Assistant-Config · GitHub.

I can’t help you id you don’t copy the stuff I give you correctly.

Just wanted to type out an appreciation for this helper/automation. Worked great, really enjoy.

Thank you for this.

1 Like

NEW VERSION available today

:bookmark_tabs: Changelog

  • 2024-06-04: Blueprint Input Sections for enhanced Descriptions.