Just to isolate the parts, in order to help us finding the issue, could you please try to run it without the if clause and confirm if it does what you are expecting?
Also, could you please go to Developer Tools, then click on State tab and search for media_player.denon_avr_x3100w, then take not for the different states when that device is on, off or in standby (if supported)?
That’s exactly what I’ve been looking for! Using it to control kitchen/diner lights but I wanted to only dim the lights related to the face showing. Spent ages trying different things but this saved me hours/days of working out. Top marks Ed!
Hi guys, I’ve got the original cube and with this automation and helper (thanks @EdwardTFN) it works fine but is reporting the 2-5, 3-6 issue. Does not affect rotation, (2 is 2, 3 is 3 etc) but does affect knock and slide. I see there are definite issues on GitHub, this forum and Reddit about this but no obvious resolution that I can see. Have I missed something? I’m using the cube directly with HA on a ConBee stick so no Aqara Hub.
There are a few posts (various forums, some referring to ZHA) that say that the cube has an issue with mixing up sides 2 & 5, and 3 & 6.
I’ve set up the helper which recognises when i have flipped the cube and registers the correct face, for example:
Flipping from side 1 to side 2, the allocated lights come on correctly. When I rotate the cube with side 2 facing up, the lights allocated to side 2 increase/decrease brightness. When I knock the cube with side 2 facing up, it operates the blind which is allocated to side 5.
I can see this action in the logs or a page somewhere (it escapes me where it is for now) and i see last face as 2 and when i rotate the cube it switches to side 5
In Z2M you can do that, or just go to the device in Home Assistant, change the mode, do a ‘throw’ action with the cube, and it changes…
The throw action that you don’t have here…
You also are missing the hold command, the drop command is listed but no longer available. then there is the 52 other scene based actions that ZHA has no access to. If I knew how to write a quirk I could do something about it, but I looked into it and honestly have no clue…
I suspect that is a zigpy induced problem or something happening with operator movement, but if you monitor the zha events OR do your own event like I do here and monitor that as a sensor on the dashboard you can easily see what the BP sees. (real time)
@EdwardTFN, I made an error in explaining. The rotate function also switches to the wrong side. I don’t think it’s your coding, it looks like an issue with the Cube mis-reporting. If you go into the “last number’ Helper and select it to show the log files then you can clearly see it happening. I’ll try and get a short video of it happening.
If you are flipping it that gently it may not be registering as a flip…
I know I can do it and mention it as a secret triggering method on my blueprints with a way to automate against that.
If you want it to register the flip you need to flip it hard enough that it makes a noise at the end of the move against the table.
It’s not that, the video was to show it clearly happening. It isn’t the way it is being used, it is something registering the wrong side for the action. Trust me, I’ve done a lot of testing.