Hello…
Not sure what the proper formatting for multiple template sensors should be. I would like two sensors but I can’t figure out what the problem is with this:
template:
- sensor:
- name: "Time to next light event"
state: "{{ (state_attr('binary_sensor.sr_light_cycle', 'next_update') | as_datetime | as_local - now() - timedelta(hours=1)).total_seconds() | timestamp_custom('%Hh %Mm',false) }}"
icon: mdi:update
- name "Next light update"
state: "{{ as_timestamp(state_attr('binary_sensor.sr_light_cycle', 'next_update')) | timestamp_custom('%d %h at %H:%M')}}"
icon: mdi:table-clock
The first entry is fine, the second complains of a “bad indenation of a sequence entry”. Not sure why the first one works but the second one doesn’t.
Any hints please?