Configuring the package in HomeAssistant Docker container - sagilo/pyswitcherv2 GitHub Wiki
Make sure the package is installed and configured properly
- First we need to pull the container
sudo docker pull homeassistant/home-assistant:latest - Run Home Assistant container
docker run --name=Home-Assistant -d \ --env="TZ=Asia/Jerusalem" \ --v="/path/to/your/config:/config:rw" \ --net=host \ --restart=always \ --detach=true -t \ homeassistant/home-assistant:latest \ python -m homeassistant --config /config
- notice the path
/path/to/your/configwhich should be set according to your config directory
-
Go to your config directory and create a new directory named
custom_components, in it, create a new directory namedswitcher, should be something like/path/to/your/config/custom_components/switcher -
Copy the package files including your configured
credentials.jsonto newly createdSwitcherdirectory. -
Test: Connect to the container
sudo docker exec -i -t Home-Assistant /bin/bash -
Test: Run a command within the container
/path/to/your/config/custom_components/switcher/switcher.py -m get_state -
If no errors comes up, configure Switcher in HomeAssistant Remember to use the docker config path when configuring the commands
/path/to/your/config/custom_components/switcher
If you run into any issues, please submit an issue.