Skip to content

Configuring the package in HomeAssistant Docker container

BuSHari edited this page Mar 19, 2018 · 4 revisions

Make sure the package is installed and configured properly

  1. First we need to pull the container
    sudo docker pull homeassistant/home-assistant:latest
  2. 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/config which should be set according to your config directory
  1. Go to your config directory and create a new directory named custom_components, in it, create a new directory named switcher, should be something like /path/to/your/config/custom_components/switcher

  2. Copy the package files including your configured credentials.json to newly created Switcher directory.

  3. Test: Connect to the container
    sudo docker exec -i -t Home-Assistant /bin/bash

  4. Test: Run a command within the container
    /path/to/your/config/custom_components/switcher/switcher.py -m get_state

  5. 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.