Turn off device at certain time

Hello All,
I’m trying to create a automation in which the boiler relay turns off at certain time which is detemined by a helper -input_datetime- which i created called boiler time, i’m also trying to setup in the same automation a way to turn off the boiler after x amount of hours.

Any help where i’m going wrong ?

`
alias: 2.09) Turn Boiler Off
description: ""
trigger:
  - platform: template
    value_template: >-
      value_template: ""{{ states('sensor.date__time') == (states.input_datetime.boiler_time)}}""
condition: []
action:
  - type: turn_off
    device_id: d7472368207b8dc0e000c744f57dd1c3
    entity_id: switch.boiler_relay
    domain: switch
mode: single
`

That’s not going to give you what you think it is, but the good news is that there’s a far simpler solution in the form of a time trigger:

trigger:
- platform: time
  at: input_datetime.boiler_time
1 Like

thank you so much