1. Home
  2. Home Assistant
  3. Battery devices

Home Assistant

Battery devices in Home Assistant

Get battery sensors reporting reliably in Home Assistant, and know why they lag.

Updated August 2026

Why they are different

A mains-powered Shelly is awake all the time. Home Assistant asks it something, it answers.

A battery device spends almost its whole life asleep — that is how a sensor runs for two years on a coin cell. It wakes for a moment, says what it has to say, and goes back to sleep. Nothing can query it, because there is nothing listening between those moments.

The fix in both cases is the same idea: stop asking the device, and let the device tell you. How that is arranged differs by generation.

Gen1 — CoIoT unicast

Gen1 battery devices — H&T, Flood, Door/Window, Motion, Button — push their state with CoIoT.

By default CoIoT uses multicast, and multicast is unreliable across VLANs, some routers, and most virtualised Home Assistant installations. The device shouts into the room and nothing hears it.

Switch it to unicast and give it the address. In the device’s web interface:

  1. Go to Settings → CoIoT
  2. Enable CoIoT peer — sometimes labelled unicast
  3. Enter your Home Assistant server’s address and port: 192.168.1.10:5683
  4. Save

Now the device sends directly to Home Assistant instead of broadcasting.

Waking the device to configure it. You cannot open the web interface of a sleeping device. Press its button — most Gen1 battery devices stay awake for a few minutes after a press — or keep it on USB power while you set it up.

Plus and newer — outbound websocket

Plus, Gen3 and Gen4 battery devices do not use CoIoT. They open a websocket connection outwards to Home Assistant when they wake.

The setting is in the device’s web interface under Settings → Outbound WebSocket:

  1. Enable it
  2. Set the server to ws://HOME-ASSISTANT-IP:8123/api/shelly/ws
  3. Save

The device now connects to Home Assistant each time it wakes, delivers its readings, and disconnects.

This is more robust than CoIoT — it is ordinary TCP, so it crosses VLANs and NAT the way any other traffic does. But it still has to be configured while the device is awake.

What normal looks like

Worth knowing before you conclude something is wrong.

The device shows as unavailable between reports. That is the device asleep, not a fault. Home Assistant keeps the last known values.

Readings arrive on a schedule, not continuously. An H&T reports on a temperature change or on its wake interval — a value that updates every few minutes is behaving correctly.

Firmware updates take a wake cycle. A battery device cannot be updated on demand; press its button to speed it up.

Auto-discovery often does not find them. A sleeping device is not on the network to be discovered. Add it manually by IP address while it is awake.

Tips & best practices

  • Reserve the IP address. A battery device rejoining the network after a DHCP change may take a new address, and nothing will tell you.
  • Signal strength matters more here than anywhere else. A weak signal means a longer wake time to connect, and that is battery spent on nothing but Wi-Fi. Anything below about −70 dBm shortens the battery life measurably.
  • Update firmware before you fit the device. Several connection improvements for battery devices shipped in firmware, and updating one in a crawlspace is not a job you want.
  • Watch the battery entity, not the device. A sensor that stopped reporting three weeks ago is usually flat, and the battery entity said so at the time.
  • From firmware 1.5.9 onwards a static IP is no longer required for battery devices to connect quickly. Older guidance says otherwise — see update device firmware.