Having issue with the config yaml. Grouping of sensor/sensors to function correctly.
Logger: homeassistant.config
Source: config.py:978
First occurred: 9:39:46 PM (1 occurrences)
Last logged: 9:39:46 PM
Invalid config for [template]: expected dictionary for dictionary value @ data[‘sensors’]. Got None extra keys not allowed @ data[‘nextsunrise’]. Got {‘friendly_name’: ‘Next Sunrise’, ‘value_template’: ‘{{ as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom(’ %I:%M %p’) | replace(" 0", “”) }}\n’, ‘icon_template’: ‘mdi:weather-sunset-up’} extra keys not allowed @ data[‘nextsunset’]. Got {‘friendly_name’: ‘Next Sunset’, ‘value_template’: ‘{{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom(’ %I:%M %p’) | replace(" 0", “”) }}\n’, ‘icon_template’: ‘mdi:weather-sunset-down’}. (See /config/configuration.yaml, line 34).
# Sun Rise Sun Set
template:
- sensors:
nextsunrise:
friendly_name: 'Next Sunrise'
value_template: >
{{ as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom(' %I:%M %p') | replace(" 0", "") }}
icon_template: mdi:weather-sunset-up
nextsunset:
friendly_name: 'Next Sunset'
value_template: >
{{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom(' %I:%M %p') | replace(" 0", "") }}
icon_template: mdi:weather-sunset-down
# Conversion Sensors for Pollen
- sensor:
- name: TPS Color
state : >
{% if states("sensor.tomorrow_io_kish_home_tree_pollen_index") == 'none' %}
1
{% elif states("sensor.tomorrow_io_kish_home_tree_pollen_index") == 'very_low' %}
2
{% elif states("sensor.tomorrow_io_kish_home_tree_pollen_index") == 'low' %}
3
{% elif states("sensor.tomorrow_io_kish_home_tree_pollen_index") == 'medium' %}
4
{% elif states("sensor.tomorrow_io_kish_home_tree_pollen_index") == 'high' %}
5
{% elif states("sensor.tomorrow_io_kish_home_tree_pollen_index") == 'very_high' %}
6
{% endif %}
- sensor:
- name: GPS Color
state : >
{% if states("sensor.tomorrow_io_kish_home_grass_pollen_index") == 'none' %}
1
{% elif states("sensor.tomorrow_io_kish_home_grassen_index") == 'very_low' %}
2
{% elif states("sensor.tomorrow_io_kish_home_grass_pollen_index") == 'low' %}
3
{% elif states("sensor.tomorrow_io_kish_home_grass_pollen_index") == 'medium' %}
4
{% elif states("sensor.tomorrow_io_kish_home_grass_pollen_index") == 'high' %}
5
{% elif states("sensor.tomorrow_io_kish_home_grass_pollen_index") == 'very_high' %}
6
{% endif %}
- sensor:
- name: WPS Color
state : >
{% if states("sensor.tomorrow_io_kish_home_weed_pollen_index") == 'none' %}
1
{% elif states("sensor.tomorrow_io_kish_home_weed_pollen_index") == 'very_low' %}
2
{% elif states("sensor.tomorrow_io_kish_home_weed_pollen_index") == 'low' %}
3
{% elif states("sensor.tomorrow_io_kish_home_weed_pollen_index") == 'medium' %}
4
{% elif states("sensor.tomorrow_io_kish_home_weed_pollen_index") == 'high' %}
5
{% elif states("sensor.tomorrow_io_kish_home_weed_pollen_index") == 'very_high' %}
6
{% endif %}
From reading there is a new way to use templates, so you don’t use platform: template, but that throws the error above.
Going with it, I can’t get indenting to pass config check and so config will not start. Any wizard of HA out there?