Entity wont show up as device in energy management

I have two entities I created that I want to manage in energy management. But only one of them shows and I can figure out why.

Here is my yaml for the sensors:

#Virtual Panel A Phase A Energy Sensor

- sensor:
  - name: Panel A Phase A energy
    unit_of_measurement: "kWh"
    state_class: total_increasing
    device_class: energy
    state: "{{ states('sensor.nipsco_phase_a_energy') | float - states('sensor.panel_c_phase_a_energy') | float }}"

#Virtual Panel A Phase B Energy Sensor

- sensor:
  - name: Panel A Phase B energy
    unit_of_measurement: "kWh"
    state_class: total_increasing
    device_class: energy
    state: "{{ states('sensor.nipsco_phase_b_energy') | float - states('sensor.panel_c_phase_b_energy') | float }}"

Here are the created entities:

I know the entity has to be configured correctly to show up as an available option in energy, and I thought I had them configured correctly. sensor.panel_a_phase_b_energy shows up, but sensor.panel_a_phase_a_energy is not available as a selection on the energy dashboard.

I have to be missing something simple. Appreciate any help.

It should only have 1 entry of sensor

#Virtual Panel A Phase A Energy Sensor

- sensor:
  - name: Panel A Phase A energy
    unit_of_measurement: "kWh"
    state_class: total_increasing
    device_class: energy
    state: "{{ states('sensor.nipsco_phase_a_energy') | float - states('sensor.panel_c_phase_a_energy') | float }}"

#Virtual Panel A Phase B Energy Sensor
  - name: Panel A Phase B energy
    unit_of_measurement: "kWh"
    state_class: total_increasing
    device_class: energy
    state: "{{ states('sensor.nipsco_phase_b_energy') | float - states('sensor.panel_c_phase_b_energy') | float }}"
1 Like

Removed the extra sensor, but didn’t make a difference.

So I found the issue.

Apparently at some point when I created the sensor, I specified unit_of_measurement as “W” instead of “kWh”. Even though I changed it to correct it, the entity had an issue.

Went under Developer Tools / Statistics. Found the entity and clicked “Fix Issue” . Now it shows up.