Hi everyone,
I started to experiment with my magic cube
It is paired with zigbee2mqtt
example of mqtt message is
{"battery":97,"voltage":2995,"linkquality":39,"side":1,"angle":18.02,"action":""}
In hass, I configured following automation
# ==================================================
# XIAOMI SWITCH R02
# ==================================================
# door op de rechterknop te klikken
# doorloop je alle mogelijke combinaties van de lamp
- id: '0x00158d0002b93b6c'
alias: '(R02) magic cube'
trigger:
- entity_id: sensor.0x00158d0002b93b6c_side
platform: state
to: 1
condition: []
action:
entity_id: input_select.select_s01
service: input_select.select_next
However, the automation does not accept the integer
to: 1
If I change it to a string
to: '1'
that doesn’t work either
Following automation does work
# ==================================================
# XIAOMI SWITCH R02
# ==================================================
# door op de rechterknop te klikken
# doorloop je alle mogelijke combinaties van de lamp
- id: '0x00158d0002b93b6c'
alias: '(R02) magic cube'
trigger:
- entity_id: sensor.0x00158d0002b93b6c_action
platform: state
to: flip90
condition: []
action:
entity_id: input_select.select_s01
service: input_select.select_next
however, this is another kind of “action”…
What I want to achieve is
- detect the selected side of the cube (1,2,…,6)
- select a scene, based on the side
Can anybody help me with the correct syntax?
any help appreciated!
kind regards,
Bart