Hi All,
I am having a few issues using condition templates for an action.
My understanding is a template condition needs to return a boolean, which mine does, however when I use the expression it throws unhashable type: 'list'
.
If I use a system_log.write action with the same expression True
(or False
) is written to the log.
The expression is as follows:
action:
- condition:
- condition: template
value_template: "{{ trigger.payload_json['action'] == 'toggle' }}"
- service: system_log.write
data:
message: "{{ trigger.payload_json['action'] == 'toggle' }}"
- service: light.toggle
target: !input target_light
Obviously to get it to write to the log I have to comment out the condition but to my eyes this should work…
Cheers