Samsung TV energy in the Energy dashboard when SmartThings shows "unavailable" (workaround, validated)

If your Samsung TV’s energy sensors show unavailable in Home Assistant, but the Samsung Energy (SmartThings) app shows its daily usage, the data may be there after all. Here’s how I got my TV’s real energy into the Energy dashboard, matching Samsung’s own figures to within about 1 %.

What’s going on

The TV’s diagnostics (Settings > Devices & services > SmartThings > the TV > Download diagnostics) show two things:

  1. The TV reports real energy in its powerConsumptionReport capability, as 15-minute windows: deltaEnergy is the Wh used in each window, with start and end times. The cumulative energy and power fields stay at 0, which is why sensors built on them show nothing.
  2. The TV lists powerConsumptionReport in custom.disabledCapabilities, while still sending real data. The SmartThings integration respects that list, so no working sensor is created.

This looks like the same issue as core #150059 (QN900C). My TV is a 2022 Crystal UHD BU8000 (UA75BU8000).

The workaround

A small package with two parts:

  1. A REST sensor that reads the TV’s diagnostics from Home Assistant’s own API every 5 minutes, exposing the latest window’s deltaEnergy (Wh) with its start and end times.
  2. A trigger-based template sensor that adds the windows up into a normal energy sensor (kWh, total_increasing) for the Energy dashboard. Each window is counted exactly once, by remembering the end time of the last window counted, so restarts neither double-count nor lose a window.

yaml

rest:
  - resource: https://homeassistant.local:8123/api/diagnostics/config_entry/CONFIG_ENTRY_ID/device/DEVICE_ID
    headers:
      Authorization: !secret ha_diag_token   # "Bearer <long-lived token>"
    scan_interval: 300
    sensor:
      - name: "Living room TV energy window"
        unique_id: living_room_tv_energy_window
        unit_of_measurement: Wh
        value_template: >
          {{ value_json.data.status.components.main.powerConsumptionReport.powerConsumption.value.deltaEnergy }}
        json_attributes_path: "$.data.status.components.main.powerConsumptionReport.powerConsumption.value"
        json_attributes:
          - start
          - end

template:
  - trigger:
      - trigger: state
        entity_id: sensor.living_room_tv_energy_window
        attribute: end
    sensor:
      - name: "Living room TV energy"
        unique_id: living_room_tv_energy_total
        unit_of_measurement: kWh
        device_class: energy
        state_class: total_increasing
        state: >
          {% set prev = this.state | float(0) %}
          {% set t = trigger.to_state %}
          {% set e = t.attributes.get('end') if t is not none else none %}
          {% if t is none or e is none or t.state in ['unknown', 'unavailable']
                or e == this.attributes.get('last_end') %}
            {{ prev }}
          {% else %}
            {{ (prev + (t.state | float(0)) / 1000) | round(4) }}
          {% endif %}
        attributes:
          last_end: >
            {% set t = trigger.to_state %}
            {% set e = t.attributes.get('end') if t is not none else none %}
            {% if t is not none and e is not none and t.state not in ['unknown', 'unavailable'] %}
              {{ e }}
            {% else %}
              {{ this.attributes.get('last_end') }}
            {% endif %}

You’ll need a long-lived access token (Profile > Security), and two IDs: the SmartThings config entry ID (from the address bar on the SmartThings integration page) and the TV’s device ID (from the address bar on its device page). Then add the energy sensor under Individual devices in the Energy dashboard.

Results

Five days, Home Assistant against the Samsung Energy app: 407 vs 411, 404 vs 408, 404 vs 408, 545 vs 549 and 453 vs 452 Wh. The small, steady shortfall came from my first version of the template, which most likely skipped a window after each restart; the version above counts windows by their end time to avoid that.

A surprise: the standby power

With the TV off, it reported a constant ~17 W, about 0.40 kWh a day, roughly 147 kWh a year. Watching adds only ~50–60 W, so on a typical day the TV used more energy switched off than on. On 2022 models the likely culprit is Instant On (Settings > General > Power and Energy Saving); the network standby options may add to it. Worth measuring on yours.

Caveats

  • It reads Home Assistant’s diagnostics, which isn’t an official API, so it could break with a future update.
  • 15-minute resolution: energy, not live power.
  • If the TV drops off SmartThings (showing offline although its network is fine), nothing is reported, by Samsung’s app either. Holding the remote’s power button for 5–10 seconds (a full restart) fixed it for me.
  • Older TVs may not report energy at all (my 2019 RU7100 has no deltaEnergy). Check your diagnostics file first.

Full write-up with setup details and troubleshooting: GitHub - r5e/ha-samsung-tv-energy: Workaround: get a Samsung TV's real energy use into Home Assistant from SmartThings diagnostics · GitHub

Hopefully it helps someone, and maybe it’ll help get the integration fixed properly.

I just noticed this had stopped working on mine. The log showed the sensor failed to read a non-numeric value of “none”. This was fixed by replacing the sensor’s value template block with an availability one instead. I have updated it in the changelog here.