I have the following configurations.yaml
sensor: !include sensors.yaml
Then inside sensors.yaml
- platform: template
sensors:
number_of_lights_on:
unique_id: "number_of_lights_on"
friendly_name: "Number of Lights On"
icon_template: "mdi:lightbulb"
value_template: >
{{
states.light
|rejectattr('attributes.is_hue_group', 'true')
|rejectattr('attributes.entity_id', 'defined')
|selectattr('state','eq','on')
|list
|count
}}
number_of_lights_on_in_lounge:
unique_id: "lounge_number_of_lights_on"
...ETC
- platform: template
trigger:
- platform: time
at: "00:00:00"
binary_sensor:
- name: Holiday
state: {{ True }}
But this produces a parsing error
Configuration errors
Error loading /config/configuration.yaml: invalid key: "{True: None}"
in "/config/sensors.yaml", line 40, column 0