Thanks so much for the reply. I used your older code as my system is also setup via switches and it works perfectly.
(My broadlink rm mini sends a packet to my yamaha amp adjusting volume by 5 units at a time and this works great with your automation).
Thanks for the example! The roku media_player doesn’t support volume_level, but it does support media_player.volume_up and media_player.volume_down. I got my Mi Cube to control Roku volume on the first try.
It’s working fine, however I’m continously get the following error:
Cube Open/Stop/Close Master Curtain: Error executing script. Error rendering template for call_service at pos 1: UndefinedError: 'dict object' has no attribute 'action_value'
I monitor the event using dev tools listen to events and lister to xiaomi_aqara.cube_action, it seems that in some event’s the action_value attribute not avail, even in the rotate event.
So until now, still have no idea how to get rid this error, though the automation is working fine.
Hello!
There is a cube of aqara and yeelight lamp.
I’m trying to adjust the brightness of the lamp when turning the cube. I took such automation from this topic.