good to see the whole automation.
-
you should not be using device id guids. in the ui, choose “entity” (green on the right) and pick the right entity.
here’s more info why:
Why and how to avoid device_ids in automations and scripts -
when you say “change the whole thing to seconds” what do you mean? do you mean 'input_number.worx_garagentore_vorher_offnen" is seconds? or do you mean something else? if you mean that’s in seconds, just change the minutes= to seconds=
alias: Template Worx Test Lampe Wohnzimmer
description: ""
trigger:
- platform: template
value_template: >-
{{ now() >= (states("sensor.m700_next_scheduled_start") | as_datetime -
timedelta(seconds=states("input_number.worx_garagentore_vorher_offnen") |
int))| as_local }}
condition: []
action:
- type: turn_on
device_id: nuke this..
entity_id: use the entity_id friendly name
finally… why the “for:” 1 second? that seems odd.
btw… the “as_local” is unnecessary in the trigger because both “now()” and your full expression are fully qualified… ie, both include the timezone info that they are set in. so the comparisons will do the right thing even if the two are in different timezones.