Aqara cube - Zigbee2MQTT - Event listener

Hi all,

I’ve got a Aqara Magic cube connected to Home Assistant via my Zigbee2QTT stick.
In the ‘states’ overview (under Developer Tools), i can see the states of the cube, formatted like:

battery 34
voltage 2845
linkquality 115
side 4
angle 12.32
action 

Also, i can see the screen ‘flicker’ for a split second when moving the cube, it tries to show the ‘event’, like ‘tap’ etc.

What i’d like to use is the numbers as shown by DrZzs in this video

But, how can i use the events? What ‘event’ should i listen to?

Thanks in advance.

ok this should turn a light on for you LOL

if I listen to a event

I see

now the automation

- alias: 'SquareBox 6000'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: magic_cube
      event: 6000
  action:
    service: light.toggle
    entity_id: light.office

if i side it with the 6 sided faceing up my office light toggle

I use Node Red to listen to ZHA_Events (As I am using a Sonof USB stick)

The kids use it to control a Sonos Speaker (or let Alexa tell a joke) - works great. You can see the setup below:

image
(second switch just looks to see how many degrees its been flipped)

Had no need to integrate all the other functions (flip from which side to which etc)