Hi All,
I am struggling to find a way to set a time to my helper…
I have set up the datetime helper as TIME only and tried to make sure my code also outputs time…
service: input_datetime.set_datetime
target:
entity_id: input_datetime.time_to_sell
data:
value: >
{{ as_timestamp(strptime(([states('sensor.nordpool_most_expensive_times_2'),
states('sensor.nordpool_2nd_most_expensive_time'),
states('sensor.nordpool_3rd_most_expensive_time')] | min), '%H:%M'))|
timestamp_custom('%H:%M:%S', true) }}
the error seems to point to not giving correct input - and this is hh:mm:ss format…
Executed: 3 May 2024 at 14:20:22
Error: must contain at least one of date, time, datetime, timestamp.
Result:
params:
domain: input_datetime
service: set_datetime
service_data:
value: '18:00:00'
entity_id:
- input_datetime.time_to_sell
target:
entity_id:
- input_datetime.time_to_sell
running_script: false
Again I would need some help figuring this out…