it is a little difficult to examine the side as the state changes are happening way too quick for all the connected devices in HA I suppose. Furthermore the state changed doesn’t show “side” in particular for the xiaomi cube.
Am I supposed to look for “side” in the state changed topic?
You can start listen on that topic “state_changed”, then flip the cube and stop listening on the topic. After that you can search for “side” or “Cube”.
Hello @x1125 ,
What does exatly your position syntax?
position: >
{{ [ 0, [state_attr('cover.sun_screen', 'position') | int +
trigger.payload_json.action_angle | int / 3,
100] | min ] | max }}
My goal is use this blueprint so that turning clockwise the roller shutter goes down 10% and CCW up 10%.
@mbacks in the template works for mee too, the problem is in the Developer Tools → Services which gives me the same error. Trying the code, the automation gets not editable from the GUI, but disabled too!
Here the content copy and pasted from the automations.yaml:
In my case turning right closes the sun screen (no idea what’s correct name of it, in Dutch it’s called zonnescherm) and turning left opens. For my cover (screen) accepted value range is 0-100 so there’s filter to prevent values beyond that range. In addition input value from cube (degrees) are divided to be more or less equal to accepted values (360* to max 100% opened screen) and for comfortable usage as it’s a bit hard to turn the cube 360* to fully open/close the cover.
So if I turn the cube just a bit → screen is moving also just a bit.
Making a big turn completely closing/opening it.
so I now know which face is face 4 for example. However from the automations under developer tools, i tried a simple automation of double tapping the cube with face 4 and the automation is not executed. However if I tried Flip the cube 90 degrees to face 4 the automation works perfectly.
@luckypoppy@mbacks is it possible to have this blueprint in a python script? I.e. independent of HA? I am trying to play a video stream on a raspberry pi via ssh I.e. set up as a command line switch on HA and finding it really difficult for the automation using this blueprint to toggle the switch as its not as quick as how i would normally turn it on from HA frontend and sometimes it doesn’t turn the switch on or off at all. I am looking to make it work independent if I can. Any pointers?
I have subscribed to the zigbee2mqtt topic and I can get the actions of the cube when I slide it or rotate it etc. However I dont get the extra information like which side is facing up? I only get the original basic actions of the cube.
So I had a question about using this blueprint. What should the entity be that I look at? I see multiple sensor.magic_cube_action, sensor.magic_cube_action_angle, sensor.magic_cube_action_from_side, sensor.magic_cube_action_side, sensor.magic_cube_action_to_side, sensor.magic_cube_linkquality. I thought, it would one entity like sensor.magic_cube…
Thank you so much for this updated blueprint! I had it working with my cubes a week or two ago with zigbee2mqtt in a separate docker container. But they stopped working and I can’t tell why. The cubes talk to z2m, z2m sends mqtt to hass’s mosquitto, mosquitto shows that the mqtt events are received, the entities in hass show their states, but the automation won’t fire. I don’t get where the disconnect is.
I’m not quite sure how to troubleshoot it since the automation won’t fire at all, so a trace doesn’t exist to debug.
I have the same issue . Things where working for quite a wile. But now the automation stopped working.
I might be related to some recent updates of either homeassistant core, homeassistant host or Zigbee2mqtt .
Home assistant is running on a raspberrypi4 and a CC2531 USB stick is used for Zigbee.
MQTT server runs externally.
The MQTT integration in homeassistant does not show any entities in the Aqara device MQTT info.
It seems like the MQTT addresses exposed by Zigbee2MQTT did change and therefore the auto MQTT discovery in homeassistant no longer works.
Looking at the published MQTT messages (using MQTT Explorer), the only aqara related (retained) topic I see in /homeassistant is: /homeassistant/device_automation/<my_aqara_id>/action_shake/config. Containing the following message:
Solved my problem. Not sure how
After adding some new zigbee lights, I was not able to add more lights. Google gave me the tip to unplug the zigbee USB stick and plug it in again.
After this action, I was able to add the remaining lights.
The next day I found out that my aqara was working again
Inspcting the /homeassistant/device_automation/<my_aqara_id> topic now also shows the topics action_wakeup, action_slide, action_flip180 and some others.