Skip to content

Home Assistant Integration

Damien edited this page Oct 18, 2026 · 1 revision

🏠 Home Assistant Integration

The fastest path: WattSeal can auto-publish MQTT discovery configs, HA picks up every sensor on its own, no YAML required.

The easy way: --home-assistant

WattSeal --headless --mqtt-addr <ha-broker-ip>:1883 --home-assistant

This single flag:

  • forces watt-hour units (--mqtt-unit wh), so energy sensors land correctly in HA's energy dashboard
  • disables per-process publishing (processes aren't auto-discoverable as a single sensor, see below)
  • publishes retained MQTT discovery configs under homeassistant/sensor/.../config for every component WattSeal detected: CPU, RAM, disk, network, total power, and one set of sensors per GPU

All sensors are grouped under a single HA device named after your hostname. Availability is tied to <id>/status, so sensors show as unavailable if WattSeal goes offline.

Within a minute of starting, you'll see in Settings → Devices & Services → MQTT:

  • CPU Usage (%), CPU Energy (Wh)
  • RAM Usage (%), RAM Energy (Wh)
  • Disk Read / Disk Write (MB), Disk Energy (Wh)
  • Network Download / Network Upload (MB), Network Energy (Wh)
  • Total Energy (Wh)
  • per GPU: GPU N Usage, GPU N VRAM Usage, GPU N Energy

Successful discovery looks like this:

Home Assistant device page showing WattSeal sensors

This way, HA receives WattSeal's raw data automatically. Energy, disk and network metrics will reset after a reboot. To add them to your dashboard, you may want to set up calculations for instant power (W) and accumulated energy (Wh) over time.

Sensor calculations

Instant power

To create an instant power sensor, go to Settings → Devices & Services → Helpers (at the top) → Create Helper → Derivative Sensor. As in the screenshot below, choose a name, select an energy sensor from WattSeal as the source, Time Window of 1 minute and keep the rest to default. This will give you a new sensor that shows the average power over the last minute.

Home Assistant derivative sensor creation page

Note: It will show as Wh/h, which is equivalent to W. If you want to display it as W, add this to your configuration.yaml and replace <entity_id> with the entity ID of your derivative sensor (such as sensor.living_room_pc_total_power):

homeassistant:
  customize:
    <entity_id>:
      unit_of_measurement: "W"
      device_class: power

Then reload the config in Developer Tools → YAML configuration reloading.

Accumulated sensor

To create an accumulated sensor, go to Settings → Devices & Services → Helpers (at the top) → Create Helper → Utility Meter. As in the screenshot below, choose a name, select a WattSeal accumulated sensor such as energy, disk or network activity as the source, and choose a Meter reset cycle (daily, weekly, monthly, or none to have the all-time total). This will give you a new sensor that shows the accumulated data over the selected cycle.

Home Assistant utility meter creation page

Energy dashboard

Add the all-time Total Energy sensor created above (and optionally per-component all-time sensors) as a source under Settings → Dashboards → Energy → Individual devices → Add device.

Home Assistant energy dashboard page showing WattSeal sensors

Manual setup

The --home-assistant flag is the easiest way to get WattSeal sensors into HA, but it doesn't handle per-process metrics, and you may want to customize the topic layout or disable retained discovery messages. In that case, you can add sensors manually. See MQTT Integration for the exact topic names and payload shape.

Clone this wiki locally