I’m trying to get a light to come on 5 minutes before my alarm. I created a datetime helper. I have an automation that is triggered when my next alarm changes. But I can’t get the action for that automation to set the time I’ll use to trigger the other automation to turn the light on to work.
I’ve been using the UI and I’m very new to YAML. I set the action to Call Service and then input.datetime. Then in that section I have this code:
service: input_datetime.set_datetime
target:
entity_id: input_datetime.alarm_helper
data:
timestamp: "{{ as_timestamp(states.sensor.skiboard_next_alarm.state) - 60 * 5 }}"
But it doesn’t seem to be setting a time for the helper when I check its state. What am I doing wrong?