I am getting following error on trace
Error: UndefinedError: ‘dict object’ has no attribute ‘event’
I am using zha integration , device name LUMI lumi.sensor_cube
what I am missing ?
I believe this blueprint has a way to control what rotate does with respect to the side it’s on, but I could be wrong?
I have extended this blueprint and brent’s 57 action blueprint to allow for per-side rotation actions.
Nice job, Rahul!
Awesome … works well!
Hi, just wanted to ask, recently been getting these errors in my log files for my (HAOS). Not sure if its related to the blueprint or the device itself. Cube seems to be working normally, though.
I’d be happy to share more information is required.
Logger: homeassistant.helpers.template
Source: helpers/template.py:1822
First occurred: March 16, 2022, 6:13:19 PM (82 occurrences)
Last logged: 8:53:58 AM
Template variable warning: 'dict object' has no attribute 'flip_degrees' when rendering '{{ trigger.event.data.args.flip_degrees }}'
Template variable warning: 'dict object' has no attribute 'relative_degrees' when rendering '{{ trigger.event.data.args.relative_degrees }}'
Template variable warning: 'dict object' has no attribute 'value' when rendering '{{ trigger.event.data.args.value }}'
Just putting this out there for people trying to keep track of sides, getting log errors, and other weird behavior, zigbee2mqtt has this nailed. One sensor to monitor for all operations, There are blueprints for it. I would never look back to another controller integration.
This is great - been playing with it to control my lights.
One question - I have it so rotating the cube anticlockwise dims the lights and clockwise brightens it. This works, but it only works once - so it only dims a bit, then if I rotate more it doesn’t get any brighter or dimmer. Is there a way that I can make it function as a proper dimmer? Or each turn reduces/increases brightness by X?
Sure I’m missing something here!
I am still finding these in my logfiles, any easy fixes?
2022-05-25 11:10:40 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'value' when rendering '{{ trigger.event.data.args.value }}'
2022-05-25 11:10:40 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'flip_degrees' when rendering '{{ trigger.event.data.args.flip_degrees }}'
These cubes toss out a lot of NULL triggers, so if the trigger action doesn’t filter them out you will get a lot of junk in the logs like that.
I don’t have ZHA, but the blueprint I wrote for Z2M takes that into account and only allows triggers into the automation that are valid. This Blueprint may have to be modified if you want to get rid of that.
A variation on the template trigger that you see in mine should solve that. If a trigger doesn’t have a valid keyword, it is not used and it does not throw an error.
(Note, I am assuming that this might help, I only looked at this blueprint for a moment but that’s the errors that would be with null triggers.)
I’m assuming the error is related to how the blueprint will create variables even for values that don’t exist in the event payload. Thus, the solution is to change from:
value: '{{ trigger.event.data.args.value }}'
flip_degrees: '{{ trigger.event.data.args.flip_degrees }}'
relative_degrees: '{{ trigger.event.data.args.relative_degrees }}'
to:
value: '{{ trigger.event.data.args.value | default(None) }}'
flip_degrees: '{{ trigger.event.data.args.flip_degrees | default(None) }}'
relative_degrees: '{{ trigger.event.data.args.relative_degrees | default(None) }}'
under the variables
section.
That may change it, but the reason is it’s allow to trigger without condition on the null triggers and wake-up triggers which should not be sent to the the rest of the blueprint for parsing at all…
The errors will then be that none is not valid in the rest of the blueprint.
Hoping someone can help. I have the cube setup on ZHA with the Sonoff Zigbee Stick. It shows up in my devices in an automation as what I named it, Living Room Cube. However, when I import the blueprint it does not show it in devices but shows other Aqara devices. I renamed the manufacturer in the code to unk_manufacturer because that’s what it says in device info and then when I go to the blueprint it shows me two devices one of them Living Room Cube and the other unk_manufacturer. So tested both out and neither work. Then I went to events to listen and nothing is happening when I do any cube actions. Any suggestions?
Since the update to 2023.9.0 it is no longer possible to select the device_id nor the entity_id of my Google Cast devices. Is this an issue in the Blueprint or in the Google Cast integration?
I know there were some issues related to device_id
Dear all,
I have noticed the issue is related to the Blueprint.
When creating a new automatisation, I can still select device_id and entity_id.
Anyone experiencing this issue or knows about a solution?
Many thanks in advance.
I have seen the same problem with the blueprint, that The Cube is no longer available from the select menu.
Here is quick duty fix - remove the device filtering in the bluptint. This way you will see all devices. Be aware that you MUST select The Cube, which is ZHA integration.
Here is my forked blueprint with no filtering, which is working for me.
Hi,
I’m trying to use the Shake action to activate a scene where curtains will be closed and a scene where curtains will be opened.
The problem is when I shake the cube, both scens runs, the first one for a second and the second one until it completes.
How can I set it so that it closes and opens the curtains?
action: scene.turn_on
metadata: {}
target:
entity_id: scene.abrir_estore_do_escritorio
action: scene.turn_on
metadata: {}
target:
entity_id: scene.fechar_estore_do_escritorio
Hi j08rebelo,
You are describing what happens when you have 2 actions set to the same action. when the trigger happens, the last one that is activated internally wins.
If you do have some kind of a toggle set up then this is getting bounce triggers.
You could look at my Blueprint if the second is the case, I have code to remove most bounces.
GitHub - SirGoodenough/HA_Blueprints: 🧯 My Collection of Automation and Script Blueprints for Home Assistant 🧯.
I’m looking for similar script for Cube for z2m. Is it available somewhere?
I have Z2M cube blueprints as well.