Home Assistant: Difference between revisions
(Created page with "===Install as docker container=== from https://www.home-assistant.io/installation/raspberrypi/#install-home-assistant-container sudo docker run -d \ --name homeassistant \ --privileged \ --restart=unless-stopped \ -e TZ=Europe/Berlin \ -v /home/homeassistant/.homeassistant:/config \ --network=host \ ghcr.io/home-assistant/home-assistant:stable to update # from https://www.home-assistant.io/installation/raspberrypi/#install-home-assistant-contain...") |
m (Torben moved page HomeAssistant to Home Assistant) |
||
(One intermediate revision by the same user not shown) | |||
Line 11: | Line 11: | ||
ghcr.io/home-assistant/home-assistant:stable | ghcr.io/home-assistant/home-assistant:stable | ||
to update | to restart | ||
sudo docker restart homeassistant | |||
====Update==== | |||
to update docker container to latest version | |||
# from https://www.home-assistant.io/installation/raspberrypi/#install-home-assistant-container | # from https://www.home-assistant.io/installation/raspberrypi/#install-home-assistant-container | ||
Line 33: | Line 37: | ||
--network=host \ | --network=host \ | ||
ghcr.io/home-assistant/home-assistant:stable | ghcr.io/home-assistant/home-assistant:stable | ||
===Custom Sensor=== | |||
configuration.yaml: | |||
homeassistant: | |||
customize: !include customize.yaml | |||
customize.yaml: | |||
sensor.tasmota_mt681_power_cur: | |||
device_class: "energy" | |||
unit_of_measurement: "W" | |||
sensor.tasmota_mt681_total_in: | |||
device_class: "energy" | |||
state_class: "total_increasing" | |||
unit_of_measurement: "kWh" | |||
sensor.tasmota_mt681_total_out: | |||
device_class: "energy" | |||
state_class: "total_increasing" | |||
unit_of_measurement: "kWh" |
Latest revision as of 01:10, 17 June 2024
Install as docker container
from https://www.home-assistant.io/installation/raspberrypi/#install-home-assistant-container
sudo docker run -d \ --name homeassistant \ --privileged \ --restart=unless-stopped \ -e TZ=Europe/Berlin \ -v /home/homeassistant/.homeassistant:/config \ --network=host \ ghcr.io/home-assistant/home-assistant:stable
to restart
sudo docker restart homeassistant
Update
to update docker container to latest version
# from https://www.home-assistant.io/installation/raspberrypi/#install-home-assistant-container # if this returns "Image is up to date" then you can stop here sudo docker pull ghcr.io/home-assistant/home-assistant:stable # stop the running container sudo docker stop homeassistant # remove it from Docker's list of containers sudo docker rm homeassistant # finally, start a new one sudo docker run -d \ --name homeassistant \ --restart=unless-stopped \ --privileged \ -e TZ=Europe/Berlin \ -v /home/homeassistant/.homeassistant:/config \ -v /run/dbus:/run/dbus:ro \ --network=host \ ghcr.io/home-assistant/home-assistant:stable
Custom Sensor
configuration.yaml:
homeassistant: customize: !include customize.yaml
customize.yaml:
sensor.tasmota_mt681_power_cur: device_class: "energy" unit_of_measurement: "W" sensor.tasmota_mt681_total_in: device_class: "energy" state_class: "total_increasing" unit_of_measurement: "kWh" sensor.tasmota_mt681_total_out: device_class: "energy" state_class: "total_increasing" unit_of_measurement: "kWh"