Hi, me again I have noticed that firing set_variable events in my automations causes some errors. With the blocks responsible for firing these events disabled, there are no issues, so I’m pretty sure something must be off with the global Variables.
The variables are set fine, and the automations run fine, so it took me quite some time to notice that in the traces. It looks like it always appears at the end:
I have also noticed this log after running:
Template variable error: 'this' is undefined when rendering '{{ this.attributes.get('log_events', true) }}'
Relevant excerpt of my automation:
<stuff>
action:
- event: set_variable
event_data:
key: stan_grzalki
value: true
set_timestamp: false
enabled: true
<other actions>
mode: single
My variables look like this:
default_timestamp: true
log_events: true
variables:
grzalka_pv_start: 0
stan_grzalki: false
czas_pracy_total: 0
test_variable:
value: 100
timestamp: "2024-10-10T22:57:16.239481+02:00"
friendly_name: Variables
Errors only appear when the event action is enabled. It doesn’t matter whether set_timestamp is true or false. Do you know what might be wrong?