HI folks, hoping soemone can help me here.
I have the cube installed (via zigbee2mqtt) and the actions (flip 90 rotate etc.) are working fine in my automations.
What I’d like to do is to be able to utilise the the “side” functions in combination. For exmaple if the cube has side 1 facing up and I turn the cube left/right the volume on my google hub is turned up/down. If side 2 is facing up and I turn the cube left/right the volume on my soundbar is turned up/down.
The volume stuff is easy enough because the actions are avaiable but I’m having trouble figuring out identify the “Side” and act on that.
the zigbee2mqtt logs have entries such as the following:
INFO:
MQTT publish: topic 'zigbee2mqtt/MagicCube', payload '{"action":"flip90","angle":17.86,"battery":80,"from_side":0,"linkquality":123,"side":1,"to_side":1,"voltage":2965}'
INFO:
MQTT publish: topic 'zigbee2mqtt/MagicCube', payload '{"action":"","angle":17.86,"battery":80,"linkquality":123,"side":1,"voltage":2965}'
INFO:
MQTT publish: topic 'zigbee2mqtt/MagicCube/action', payload 'flip90'
On that basis and following some searching I thought I would be able to use a sensor like this:
sensor:
- platform: mqtt
name: Magic Cube Side
state_topic: “zigbee2mqtt/MagicCube”
value_template: “{{ value_json.to_side }}”
whilst the sensor displays in HA, giving errors config wise, I dont appear to be getting the 'side data".
I would prefer to do this without resorting to adding any more custom components. Any help appreciated