Energy sensors not appearing in energy dashboard

Hi, I’ve been trying to create an entity to track my kitchen light usage in the energy dashboard. However the entity is never listed as an option when configuring the energy dashboard. I’ve waited over 24 hours but no luck. Here is my configuration:

  - platform: template
    sensors:
      kithcen_sink_lights_power:
        value_template: >
          {% if is_state('switch.kitchen_sink_light', 'on') %}
            7
          {% else %}
            0
          {% endif %}
        device_class: power
        state_class: measurement
        unit_of_measurement: 'W'

  - platform: integration
    name: kitchen_sink_lights_energy_usage
    source: sensor.kitchen_sink_lights_power
    device_class: energy
    state_class: total_increasing
    unit_of_measurement: kWh
    unit_prefix: k
    round: 6

Am I missing something?

Actually, I don’t know why. But I would like to recommend this integration to you:

For your case, just add this to your config and you are ready for the energy dashboard:

sensor:
  - platform: powercalc
    entity_id: switch.kitchen_sink_light
    fixed:
      power: 7

This will create a W and a kWh sensor for your kitchen sink light. The kWh sensor is addable to the energy dashboard.

Ive tried that. I’ve been having issues with this integration not showing any entities. I added 3 entities and only 1 of them showed up in the energy dashboard. I’ve been debugging with the creator but he is also stumped. https://github.com/bramstroker/homeassistant-powercalc/issues/215

I have a feeling there’s a bug in home assistant itself not created energy entities correctly.