#use sensor value to a time funktion

1 messages · Page 1 of 1 (latest)

amber harness
#

Hi, i have a sensor that is returning a time in this format HH:MM

How do i use this value to a time funktion

condition: time
after: '{{ states("sensor.cheapest_hour_dishwasher") }}'

does not work! Can someone point me in a direction or bring a solution !

sturdy tinsel
#

Currently sensors need to be device class timestamp to be used directly in a Time condition, and templating is not allowed. For your sensor you can use a template condition as follows:

condition: template
value_template: |
  {{ now() >= today_at(states('sensor.cheapest_hour_dishwasher'))}}