Hi I am currently tinkering around and wanted to try something out.
For various testing purposes I tried to set a “dynamic” for-trigger
See Code below:
description: test
mode: single
trigger:
- platform: device
type: changed_states
device_id: 123
entity_id: 456
domain: light
for:
hours: 0
minutes: 0
seconds: |
{{ states('counter.counter_bad') | float }}
condition: []
action:
- action: telegram_bot.send_message
metadata: {}
data:
message: |
test
alias: variablelight test
I always get a
Message malformed: expected float for dictionary value @ data[‘for’][‘seconds’]
Errormessage.
I tried {{ states(‘counter.counter_bad’) | int }} and I searched the forum and noone changed the “for” value and I really could not find a simple approach for my goal I wanted to reach.
Therefore my questions:
Is this even possible and if yes: what am I doing wrong?
My main goal was to make my light be on longer every increment value x whenever it has been triggered.
And if the light was not retriggered by the current counter value it would simply reset the counter.
Does anyone have Ideas what my issue could have been?
Thanks in advance!