Mabaelst
(Bart Teuwen)
1
I have a sensor with the following value (see image):

and I’ve set up a trigger as follows:
alias: Vakantie
description: ""
triggers:
- trigger: time
at: >
{{as_timestamp(state_attr('sensor.agenda_bart','Vandaag_Events')[0].start)|
timestamp_custom("%H:%M")}}
conditions: []
actions:
However, this doesn’t work. Can someone explain why? Thanks for any feedback.
d921
(dominic)
3
My original response overlooked the screenshot. (It’s usually best to paste stuff like that as preformatted text rather than screenshotting.)
Your template is valid given the state of the sensor you posted. Your problem, I think, is that the time trigger only supports limited templates, and state_attr isn’t supported in limited templates.
WallyR
(Wally)
4
Set it to trigger each minute or second and then make the check for time in the conditions instead.
Hellis81
(Hellis81)
5
I would probably create a sensor entity that has the event time as it’s state.
That can be used to trigger a time trigger.
EDIT:
Or where is this data coming from?
Is it a calendar?
Mabaelst
(Bart Teuwen)
6
Thank you everyone for your response. Yes, it is a calendar!
Hellis81
(Hellis81)
7
So why not use a calendar trigger?
1 Like