I try to put the value of an input_number into the trigger time (for: minutes) with a template.
This doesn’t work with the error:
Error loading /config/configuration.yaml: invalid key: "OrderedDict([("states('input_number.zeit_einstellen'')|int", None)])"
in "/config/automations.yaml", line 46, column 0
Means the line with the minutes: ...
The similar line starting with message: ...
works. Why?!
trigger:
- platform: device
type: turned_on
device_id: 158cbd37fca011ea9ae29d78e159a700
entity_id: switch.on_off_plug_in_unit_4
domain: switch
for:
hours: 0
minutes: {{ states('input_number.zeit_einstellen'')|int }}
seconds: 0
condition: []
action:
- service: persistent_notification.create
data:
title: Test-Message
message: "blabla: {{ states('input_number.zeit_einstellen')|int }}"
notification_id: testm
- type: turn_off
device_id: 158cbd37fca011ea9ae29d78e159a700
entity_id: switch.on_off_plug_in_unit_4
domain: switch
Sorry for the slightly question. But the template editor is fine with the code above.
I also tried to work with double quotes in all variations, like in the documentation described, this could not be the right way in my point of view (didn’t work, too):
minutes: "{{ states('input_number.high_temp_min')|int }}"
Thanks for your help…