home assistant adding custom sensors
Discussion
so im trying to add just a simple time sensor copying it off the HA website
yet when i paste it in i just get errors when i try to reload the yaml
this is what im trying to add
sensor:
# Minimal configuration of the standard time and date sensor
- platform: time_date
display_options:
- 'date_time_iso'
# Build on the standard sensor to produce one that can be customized
template:
- sensor:
- name: "Date and time"
state: "{{ as_timestamp(states('sensor.date_time_iso')) | timestamp_custom('%A %B %-d, %I:%M %p') }}"
icon: "mdi:calendar-clock"
yet i get
96 | sensor:
^
97 | # Minimal configuration of th ...
when i edit the file so i adjust the indent then i get more bks when i try to reload the yaml
i do have other ones that work but i had a time playing around with indenting and things and if i had the sensors for doing the cpu temps etc then i the other one stops working
yet when i paste it in i just get errors when i try to reload the yaml
this is what im trying to add
sensor:
# Minimal configuration of the standard time and date sensor
- platform: time_date
display_options:
- 'date_time_iso'
# Build on the standard sensor to produce one that can be customized
template:
- sensor:
- name: "Date and time"
state: "{{ as_timestamp(states('sensor.date_time_iso')) | timestamp_custom('%A %B %-d, %I:%M %p') }}"
icon: "mdi:calendar-clock"
yet i get
96 | sensor:
^
97 | # Minimal configuration of th ...
when i edit the file so i adjust the indent then i get more bks when i try to reload the yaml
i do have other ones that work but i had a time playing around with indenting and things and if i had the sensors for doing the cpu temps etc then i the other one stops working
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff