Why does this not work?
---
# This blueprint takes a date and ...
blueprint:
source_url: https://github.com/niro1987/homeassistant-config/blob/main/blueprints/automation/niro1987/timedelta.yaml
name: Timedelta
description: >-
Some description
domain: automation
input:
dt:
name: Date/Time Sensor
description: The datetime sensor
selector:
entity:
domain: sensor
device_class: timestamp
hours:
name: Hours
description: The number of hours to use for the timedelta
selector:
number:
mode: box
min: 0
max: 24
step: 1
default: 0
minutes:
name: Minutes
description: The number of minutes to use for the timedelta
selector:
number:
mode: box
min: 0
max: 60
step: 1
default: 0
seconds:
name: Seconds
description: The number of seconds to use for the timedelta
selector:
number:
mode: box
min: 0
max: 60
step: 1
default: 0
action:
name: Action
description: Action to perform
selector:
action:
default: []
mode: single
max_exceeded: silent
variables:
var_dt: !input dt
var_hours: !input hours
var_minutes: !input minutes
var_seconds: !input seconds
var_target: "{{ states(var_dt) | as_datetime }}"
var_delta: "{{ timedelta(hours=var_hours, minutes=var_minutes, seconds=var_seconds) }}"
trigger:
- platform: template
value_template: "{{ (now() - var_delta) > var_target }}"
action: !input action
1 post - 1 participant