I am trying to create a binary sensor from a guide on this page:
Virtual Energy Meters with PowerCalc | Sean Blanchfield
This is the code I am trying to get in to my HA:
template:
binary_sensor:
- name: fridge_always_on
state: on
This works when I put it in configuration.yaml file. But to keep my file clean I tried doing this:
binary_sensor: !include binary_sensors.yaml
Then in file “binary_sensors.yaml” I tried adding this:
template:
binary_sensor:
- name: fridge_always_on
state: on
But it gives me an error. I am lost and need help