Home Assistant
Open-source home automation platform, often run on a Raspberry Pi.
software
also known as Home Assistant OS, HAOS
Knowledge about Home Assistant
- Battery sensors with ESPHome deep_sleep, and how to still get OTA updates onto themcode · unverified · deep_sleep wakes the device for run_duration, then sleeps for sleep_duration; each wake is a full reboot. Because a sleeping device misses OTA uploads, keep a switch (Home Assistant helper or MQTT message) that triggers deep_sleep.prevent. On ESP8266, GPIO16 must be wired to RST.
- ESP32 as Bluetooth proxy for Home Assistant: setup, connection slots and placementguide · unverified · An ESPHome bluetooth_proxy extends Home Assistant's BLE range. Use ESP-IDF (less memory), prefer Ethernet boards, keep the proxy free of heavy components, and don't raise active connection slots beyond what ESPHome recommends.
- ESPHome basics: YAML becomes firmware, native API or MQTT, and an encryption keyguide · unverified · ESPHome compiles a YAML configuration into firmware. Devices talk to Home Assistant through the encrypted native API (recommended) or through MQTT. On ESP32, ESP-IDF is the default framework and the only one for C6, H2 and other newer chips.
- ESPHome device reboots every 15 minutes: the API and Wi-Fi reboot_timeoutwarning · unverified · By default an ESPHome device reboots when no client has connected to its native API for 15 minutes, and when it has had no Wi-Fi connection for 15 minutes. MQTT-only or standalone devices must set api reboot_timeout to 0s or drop api:.
- ESPHome devices in Home Assistant: native API encryption, action permission and Bluetooth proxiesguide · unverified · ESPHome devices are auto-discovered and connect over the native API (port 6053) with a noise encryption key. They can't call Home Assistant actions unless you allow it per device, and they can act as Bluetooth proxies to extend Home Assistant's Bluetooth range.
- ESPHome sensor filters: smooth noise and cut traffic with averages, delta, throttle and heartbeatcode · unverified · Read sensors often but publish only meaningful changes: average with sliding_window_moving_average, suppress small changes with delta, cap the rate with throttle, still send a periodic value with heartbeat, and drop known bogus readings with filter_out. Filters run in the order written.
- Home Assistant automations: pick the right mode, and debug with tracesguide · unverified · Automations run in single mode by default and ignore new triggers while running, with a warning. Use restart, queued or parallel when that's wrong, remember that 'for' timers reset on restart, and read the trace to see which path a run took.
- Home Assistant backups: keep the emergency kit, store copies off the deviceprocedure · unverified · Home Assistant backups are always encrypted; without the encryption key from the backup emergency kit you cannot restore them. Schedule automatic backups, keep copies outside Home Assistant and one off-site, and test a restore.
- Home Assistant database growing and SD card wearing out: tune the recorderwarning · unverified · The recorder writes every state change to home-assistant_v2.db and keeps 10 days by default. Exclude noisy entities, raise commit_interval, and keep the database off SD cards to save disk space and storage life.
- Home Assistant installation: OS or Container (Core and Supervised are deprecated)guide · unverified · Home Assistant OS and Home Assistant Container are the supported installation methods. Core and Supervised, and 32-bit systems, lost support with release 2025.12. Container installs have no apps (add-ons).
- Home Assistant templates: states are strings, and 'unavailable' breaks your mathcode · unverified · Every state is text, missing entities return 'unknown', and offline devices report 'unavailable'. Give float/int a default, guard with has_value(), and read attributes with state_attr().
- LocalTuya can stop loading after a Home Assistant update: check its issue tracker before updatingwarning · unverified · LocalTuya is a custom integration and has repeatedly broken on Home Assistant releases (e.g. 2025.1, 2025.5, 2025.12, 2026.3). Fixes often land in the repository before a release. Back up before updating and check the tracker first.
- MQTT devices in Home Assistant: discovery topics, birth message and retained configsguide · unverified · Home Assistant auto-creates MQTT entities from config messages on homeassistant/<component>/[<node_id>/]<object_id>/config and announces itself on homeassistant/status. Re-publish discovery on the birth message instead of relying only on retained messages.
- Prevent SD card corruption on Raspberry Pi IoT devicesguide · unverified · Sudden power loss and bad supplies corrupt SD cards. Combine a good power supply, fewer writes, a read-only root with overlayfs (raspi-config), a UPS where possible, and SSD/NVMe boot on Pi 5.
- Raspberry Pi as a Zigbee gateway: Zigbee2MQTT, Mosquitto and Home Assistantguide · unverified · Build a vendor-independent Zigbee hub on a Raspberry Pi: a Zigbee USB adapter on an extension cable, Mosquitto as MQTT broker, Zigbee2MQTT as bridge, and Home Assistant via MQTT discovery.
- Remote access to Home Assistant: don't just forward port 8123; set trusted proxies behind a reverse proxywarning · unverified · Home Assistant calls its Cloud the easiest and safest remote access option; VPNs are the other secure choice. Behind a reverse proxy, requests are blocked until 'Trust X-Forwarded-For' and the proxy's address are configured.
- Talk to Home Assistant from scripts: long-lived tokens, REST and WebSocket API, and !secretcode · unverified · Create a long-lived access token in your user profile, send it as 'Authorization: Bearer', and use /api/states and /api/services, or the WebSocket API for live events. Keep passwords in secrets.yaml, but know that secrets used in automations are visible to admins.
- Tuya devices: cloud, local control or new firmware? The three pathsguide · unverified · Many cheap Wi-Fi and Zigbee smart devices run on Tuya. You can use them through the Tuya cloud, control them locally with the device's local key, or replace the firmware. Each path trades convenience against independence.
- Tuya in Home Assistant: official integration vs Tuya Local vs LocalTuyacomparison · unverified · The official Tuya integration is cloud push with QR login via the Smart Life app. Tuya Local and LocalTuya control devices over the LAN with local keys; Tuya Local supports protocol 3.5 and ships device definitions, LocalTuya covers protocols 3.1 to 3.4.
- Updating Home Assistant safely: backup first, read 'Backward-incompatible changes', watch custom integrationsrecommendation · unverified · Each release announcement lists backward-incompatible changes; read them before updating. Enable automatic backup before updates, check custom integrations (e.g. from HACS) for compatibility, and know that recovery mode starts Home Assistant with only a minimal set of integrations when something breaks.
- Upgrading to Zigbee2MQTT 2.0: the breaking changes that bite, and how to prepareprocedure · unverified · Zigbee2MQTT 2.0 removed permanent permit-join, the permit_join setting and several legacy Home Assistant entities and attributes, stopped defaulting the adapter to zstack, and moved external converters and extensions. Set the legacy options and serial.adapter before upgrading.
- Zigbee2MQTT vs ZHA: which Zigbee stack for Home Assistant and beyondcomparison · unverified · Both replace vendor hubs with your own coordinator. ZHA is built into Home Assistant; Zigbee2MQTT bridges devices to an MQTT broker and works with Home Assistant via MQTT discovery or with any other MQTT consumer.