What is telling you about side 0. On Z2m there is no side 0.
1 thru 6.
Could you tell us what you did? Because I am facing the same issue right now
We went thru an extensive troubleshooting sequence that you should read all of if you have the same problem. Otherwise ask an actual question and I will help.
I did read it all of course. He said he found the issue in his last step but didnāt say what he did.
Thanks for answering Sir_Goodenough, appreciate it. I added both the main automation and the dimmer script, but so far no success in making it work. I tried another simple action, which works. This is where I am at:
The names for the script and the light should be correct (I used the auto suggestion after you type light./script.) And yes, the cube is in scene mode. I also tried value_json.action_angle and value_json.angle, although I know it is value_json.action_angle.
I think there is a problem with how the script is added? Im not sure, to be honest I donāt really get it. Is it not possible to edit the scripts?
If you want to edit the scripts, they need to be added in the file scripts.yaml and the ui will see them.
I donāt really want to edit it at all
I just thought itās not working because itās not added right.
This is what itās supposed to look like, correct?
Yes, thatās the blueprint, no need to edit the blueprint part.
Not sure what your goal is here.
What are you trying to accomplish, or what are you not able to get working.
I was trying to guide you on getting the dimmer control scripts running that I suggest you to use and you saying you donāt know what a script is.
Perhaps a bit more reading would help you understand this is a script program stub that is being called by the blueprint and that is what you are editing. If this editing stuff is not your expertise, perhaps this is not something you can do.
I never said that I donāt know what a script is.
I am trying to get the dimmer control working, that is all. When I turn the cube clockwise with side 1 up,
which is the setting you can see in my first screenshot, it does not work, and I do not know why.
I asked about the script because I was not sure if it should look like that, because outside of home assistant, a script usually looks different to me.
Since I cannot see youe whole system, and it is not clear to be what the issue is, I donāt know how to help you.
I imported the automation
I imported the script
I edited the automation to call the script for CW rotation on side 1 up (and CCW)
This is an error I am seeing:
Logger: homeassistant.components.automation.aqara_cube
Source: components/automation/init.py:680
Integration: Automation (documentation, issues)
First occurred: July 14, 2023 at 7:49:43 PM (110 occurrences)
Last logged: 6:23:00 PMError while executing automation automation.aqara_cube: Error rendering data template: UndefinedError: āangleā is undefined
Error while executing automation automation.aqara_cube: Error rendering data template: UndefinedError: ādict objectā has no attribute āangleā
Error while executing automation automation.aqara_cube: Error rendering data template: UndefinedError: ādict objectā has no attribute āvalue_jsonā
Click on that and that text should help guide you which to use. Look in the device page for this cube and see what yours uses for the angle indicator. You can also look in traces to see what your entity is called.
If this still gives you trouble, I have set up script blueprints to help with this function, look in the documentation to find them. They may work better for you.
Thanks. I checked that 2 days ago when I wrote it here:
Thatās why I asked what hamoodaslam did, because he just wrote āPlease ignore - got it to work finallyā.
I imported it like that from the beginningā¦
This is not that difficult. I hear frustration, but there is only so much I can do.
Did you build the template sensor so that you know what state the BP thinks the cube is in to help you. It is possible that it is working and the cube is not acting like you think it should act.
This has worked for a lot of people, you just need to do some testing to see what entity you have based on your setup beyond my control.
When you do actually get there, let me know as there might be something that can be clarified in the docs, but at this point, I have provided all the info and we are repeating ourselves.
Oh Iām not frustrated, all is good. I will do some more testing and get back to this page if I have a solution.
edit:
Solution:
Wrong:
service: script.dimmer_control
data:
angle: ā{{ trigger.value_json.action_angle | float(0.0)}}ā
light: light.0x0017880108d9e1d7
Right:
service: script.dimmer_control
data:
angle: ā{{ trigger.payload_json.action_angle | float(0.0)}}ā
light: light.0x0017880108d9e1d7
Thanks for all the help, it seems to work fine so far!
I gave you that link a couple of days agoā¦
https://github.com/SirGoodenough/HA_Blueprints/blob/c7f7d615c19ed9fcdbd55fc41579869211e3def1/Automations/Zigbee2MQTT-Aqara-Magic-Cube-T1-Pro-CTP-R01-Xiaomi-Lumi.md#notice-when-building-action-scripts
And I had that wrong in my very first screenshotā¦
THERE IS A NEW UPDATE:
Can anyone, someone PLEASEEE help me figure this thing out lol I am a rookie at this. But seriously I have a little UFC party tomorrow and thought this would be cool but I canāt get it to do anything. Trying to just simply increase and decrease my volume on either my Frame TV or the Denon, would prefer the Denon but really just need this to work! Any help is appreciated!
This is the automation I haveā¦
data:
angle: "{{ trigger.payload_json.action_angle | default(0.1) | float(0.2) }}"
mp: media_player.denon_avr_x1200w
This is the script that I just importedā¦
alias: Volume Control
use_blueprint:
path: SirGoodenough/volume_control_4_magic_cube.yaml
icon: mdi:knob
So you imported the script BP. Did you run that and create a script you can call?
Not giving me much to go on hereā¦
Did you read this?