Aqara Magic Cube, turn event into entity

Hi team
thanks to the amazing Aqara Magic Cube blueprint, I am properly using an Aqara Magic Cube to turn light ON or OFF when rotating left or right, and more.
Dummy question I can’t get my head around: I would like to show which side the Magic Cude is facing up on my Lovelace dashboard. Not being an entity, how to make a last_event an entity?

Example of the event received. I’d simply want to show “Face up: 6”, 6 being the activated_face, on my dashboard:

    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:15:8d:xx:xx:xx:20:88",
        "unique_id": "00:15:8d:xx:xx:xx:20:88:2:0x0012",
        "device_id": "f2c67b3fefa61fb1147cf5",
        "endpoint_id": 2,
        "cluster_id": 18,
        "command": "flip",
        "args": {
            "value": 69,
            "flip_degrees": 90,
            "deactivated_face": 1,
            "activated_face": 6
    "origin": "LOCAL",
    "time_fired": "2022-02-28T17:41:19.604763+00:00",
    "context": {
        "id": "880a94280a442f8e3516b3ef6c7d4192",
        "parent_id": null,
        "user_id": null

Thanks !

Hi, This blueprint is doing what you ask. Im not the author, however works quite well.

Im actually not using it, as the Aqare Cube will not always send the face up event. It will only send if the cube is turned (while on the table), not if you hold it in you hand and turn it arround. My kids can not figure out, hence I have stopped using it.

This is not a blueprint problem, however a Cube design problem
source_url: Aqara Cube ZHA - Simplified face-based device control

Hi @lmeyran, my apologi s for the late reply here, but I was working remotely sinf mid February and got “disconnected” from HA forum for a wile.

As @khvej8 mentioned, the Cube won’t provide the face up info for every action, so I’ve used a helper to store the last face up and then use that for other automation. You can certainly use that for showing in your dashboard.

But please be aware that the cube won’t detect very slow movements. This is not only about the face up, but also can happens that an action won’t trigger an event if the action is too slow, so you can get unsync with the face up in the end. It will update properly with the next time you have a proper action reporting the face up.

Take a look at the blueprint shared by @khvej8. I would be more than happy to help if you need additional support on this.