New to HA and I can’t seem to get my head around this one, or find any topic here on how to correct/change so I can use this to trigger an automation.
sensor:
- platform: template
sensors:
wake_up_lights_richard_time_starts:
friendly_name: 'Lights Start'
icon_template: mdi:alarm-on
value_template: {{ (((state_attr('input_datetime.wake_up_lights_richard_set_time' , 'timestamp')) - (states('input_number.wake_up_lights_start_richard_minutes') | int * 60))|timestamp_custom('%H:%M:%S', false)) }}
When I try to use this sensor in an automation (e.g. at: wake_up_lights_richard_time_starts), it doesn’t work (value is 14:31:00 for example). I assume that it is being seen as a string or incorrect somehow; but stumped as to how I can correct this. Any help would be appreciated