#Error: UndefinedError: 'dict object' has no attribute 'to_state'
1 messages · Page 1 of 1 (latest)
Please share the full automation in yaml format.
Did that trigger from a state change or you manually running the automation?
I ran the automation as the button press would'nt do anything
so you can't run it manually because then there is no trigger
so any template trying to access the trigger variable will not find it
that makes sense, so that means that my blueprint isn't working correctly?
Well what happens when you actually use the remote, look at the trace of that
this trace is just not telling me anything useful
How do I check that? The expose is showing an empty string when the button is being pressed
I don't see any changes in the trace when I press the buttons on the remote
Try to open the device page of the remote in HA and check if you see any changes in the logbook.
The empty string is normal, all of my remotes send the action and then immediately an empty string, see the screenshot of 3 consecutive clicks.
oh hi Stoner!
the button presses do indeed register
I can't help you with blueprints but here's my automation for a remote:
alias: Remote - Living Room
triggers:
- entity_id:
- sensor.osram_remote_2_action
attribute: action
trigger: state
conditions:
- condition: template
value_template: |
{{ trigger.to_state.attributes.action != '' }}
enabled: true
actions:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.to_state.state == \"left_top_click\" }}"
sequence:
.
.
.
- conditions:
- condition: template
value_template: "{{ trigger.to_state.state == \"left_top_hold\" }}"
sequence:
.
.
.
- conditions:
- condition: template
value_template: "{{ trigger.to_state.state == \"right_top_click\" }}"
sequence:
.
.
.
This triggers on any button and the condition filters out the empty strings.
Hope it helps 😉
☮️ & ❤️
Hi @half sigil,
If you are having a problem with a specific Blueprint, the first point of contact is in the Exchange (or Github) post that you found the Blueprint in originally.
There are people there using the equipment and the blueprint and will be able to give you more accurate information regarding your problem.
Here you might find someone.
I have not sttn that one before myself.
Hi @low ingot , actually, the first place I asked help in was indeed in the Blueprints Exchange, you were the first and only one to have reacted to that post.
Right now I don't know where to look for help anymore, so I thought I'd try over here.. 😉
@eager musk thanks for your suggestion, I'll try that when I get home tonight!