Home Assistant

Install Home Assistant as Docker container
https://www.home-assistant.io/installation/linux#platform-installation

docker run -d \
  --name homeassistant \
  --privileged \
  --restart=unless-stopped \
  -e TZ=Europe/Berlin \
  -v homeassistant:/config \
  --network=host \
  ghcr.io/home-assistant/home-assistant:stable
 
# volume path
# /var/lib/docker/volumes/homeassistant

Configure
http://127.0.0.1:8123

Install HACS

sudo docker exec -it homeassistant bash
wget -O - https://get.hacs.xyz | bash -

Addons / Plugins
LocaTuya: https://github.com/rospogrigio/localtuya/

custom_zha_quirks
https://smarthomescene.com/reviews/tuya-zigbee-single-clamp-energy-meter-review/

sudo docker exec -it homeassistant bash
mkdir /config/custom_zha_quirks
cd /config/custom_zha_quirks
#wget https://raw.githubusercontent.com/zigpy/zha-device-handlers/dev/zhaquirks/tuya/ts0601_din_power.py
wget https://github.com/zigpy/zha-device-handlers/files/11401270/ts0601_din_power.zip
unzip ts0601_din_power.zip 
rm -r __pycache__ ts0601_din_power.zip
 
cat<<EOF>>/config/configuration.yaml
zha:
  enable_quirks: true
  custom_quirks_path: /config/custom_zha_quirks
EOF
 
# Restart Home Assistant
Developer Tools > Restart > Restart Home Assistant

Docker update

sudo docker pull ghcr.io/home-assistant/home-assistant:stable
sudo docker stop homeassistant
sudo docker rename homeassistant homeassistant.$(date -I)
sudo docker run -d \
  --name homeassistant \
  --privileged \
  --restart=unless-stopped \
  -e TZ=MY_TIME_ZONE \
  -v /PATH_TO_YOUR_CONFIG:/config \
  --network=host \
  ghcr.io/home-assistant/home-assistant:stable

Links
https://www.home-assistant.io/installation/linux
https://analytics.home-assistant.io/