Hello to you,
I have browsed the forum with the word “workday” but I did not find what I was looking for.
In the same principle as when we write our automations in an external file to configuration.yaml with the line “automation: !include automations.yaml”, I would like to put my “workday” configuration (which works well) in an external file but if I create the following line “automation: !include workday.yaml” in my configuration.yaml file and I move (cut/paste) my worday configuration from my configuration.yaml file to my workday.yaml file and I restart, I get an error in the notifications and my workday sensor does not work anymore. Does anyone know how to do this properly please?
If you put the Workday Binary Sensor’s configuration in a file named workday.yaml and then did this:
automation: !include workday.yaml
then you told Home Assistant to load all of it’s automations from a file that doesn’t exclusively contain automations. I think you already know how Home Assistant reacted to that mistake.
You can do this:
binary_sensor: !include workday.yaml
but then all of your binary_sensor configurations must also be in that file.
Alternately, you can use a different !include directive that allows you to store binary_sensor configurations in multiple files. However, I am getting ahead of myself. How do you want to store your binary_sensor configurations?