Hi, I am trying to reuse the secrets.yaml from the home assistant folder in the esphome secrets.yaml as described by Otto Winter here. I am unable to do that as I get the error :
Error reading file /config/../secrets.yaml: [Errno 2] No such file or directory: '/config/../secrets.yaml'
My config files are as under:
My HA secrets.yaml is under the ~/home_assistant folder
The secrets.yaml in ~/home_assistant folder/esphome just contains :
<<: !include ../secrets.yaml
I am running esphome on Ubuntu as a docker image and use the following command to run esphome:
docker run -d --restart always --name esphome --net=host -v ~/home_assistant/esphome:/config -v /dev:/dev -v -it esphome/esphome:latest
As you can see I have mapped the volume as: ~/home_assistant/esphome folder to the esphome config folder
My question is : Is the error that I am getting expected as the esphome docker container does not have access to the parent folder ~/home_assistant ? But then I am not able to find out how to give access to this folder. I tried modifying the volume to a level up but then esphome starts showing all HA yamls as esphome projects rather than showing yaml files from esphome folder. i.e. if if do the following
docker run -d --restart always --name esphome --net=host -v ~/home_assistant:/config -v /dev:/dev -v -it esphome/esphome:latest
Also, the error that I get is "/config/../secrets.yaml"
does not exist instead of
"/config/esphome/secrets.yaml"
does not exist. I think this should give a clue to what am doing wrong but I am not able to get it.
I am sure I am doing something silly here, can somebody help?