Why the heck is it so complicated to add entities to the the energy dashboard?

With energy prices skyrocketing all over the place especially in Europe these days many of us try to reduce their energy bill as much as possible and the energy dashboard is one of the greatest tools for that matter.

But why is it so hard to add entities which are not officially supported monitoring devices. In my case I hacked an Aqara door/window sensor to collect data from my dumb gas meter (using the reed sensor, calculating that 100 triggers equal 1 m³ gas). But this sensor does not show in the energy dashboard. I have to write up a template in the configuration yaml, think of adding unit_of_measurement and device_class and most importantly state_class: total_increasing. Who thinks of that?

For my electricity meter there is no way at all to add any readout so I just wanted to have an input_number helper that I fill manually and have the numbers show in the energy dashboard. This is even more complicated as there is no sensor data coming in regularly.

My suggestion and WTH for this WTH month is: Make it easier to use any entity in the energy dashboard, at least any sensor or input_number. Maybe even add a line for some kind of calculation, like x amount of triggers for this sensor equal 1 m³ or 1 kWh.

That would be a huge help for those of us not so familiar with the details of the energy dashboard behind the scenes.

There are only three requirements:

A correct unit.
A correct state_class.
A correct device_class.

Without these the energy dashboard would be unable to function correctly.

I agree with Rick so + one
Please point us to the correct documentation or examples. I am trying to integrated an MQTT energy/power sensors in the the ENERGY dashboard. After many possibilities still no luck.
Why is it so hard?
@ Tom: Sorry Tom your reply is insufficient.

I’ve tried the same: The first is shown in the energy dashboard, the second one not. Any idea why?

  - platform: mqtt
    name: "Kaffeebar-Verbrauch-Summiert"
    state_topic: "homee/human/Kaffeebar(10)/AccumulatedEnergyUse(91)"
    device_class: energy
    state_class: total_increasing
    unit_of_measurement: 'kWh'
    value_template: "{{ (value_json - 115.4) | round(2) }}"
  - platform: mqtt
    name: "Warmwasser-Verbrauch-Summiert"
    state_topic: "homee/human/FIBARO(11)/AccumulatedEnergyUse(103)"
    device_class: energy
    state_class: total_increasing
    unit_of_measurement: 'kWh'
    value_template: "{{ (value_json - 67) | round(2) }}"

you have to wait about an hour if you just created this entity.

Nope. Created it month’ ago and I see values in the history.

Then it should appear in the configuration for the energy dashboard. I’m assuming you’re adding it?

I thought I did (weeks ago), but obviously I ahd made a mistake :innocent: (which I now have corrected).
Sorry for confusion…

1 Like

Hi rick77

I tried to document it, how to establish an energy dashboard with peak and offpeak tariff. You can check: old-link-Energy usage of the Heat Pump with Energy Dashboard – Home Assistant Solutions

The source of the “total energy” value can be a different device than used in this solution.

Step 5 of your write up is not required. The energy dashboard will calculate the cost for you. No template sensor required.

For each source in the Energy dashboard setup:

Which gives:

Hi Tom, thanks for the Feedback. I don’t unverstanden it yet… you also point to an entity that has the current price. That’s what I use the template for. Can you give more details which kind of entity you use for the price information?

I use a standard number helper with the current cost per kWh entered into it, that way if the cost changes I just have to update one value in the system and it gets used from then on. If you are on tarrifs that vary through the day/night then you can easily copy values out of other number helpers holding the daytime and night time tariffs with a timed automation.

Ok, got it. I will update the documentation soon.

It read like you were calculating the cost not the price.

Use a helper with the price ($/kWh) there is no need to calculate the cost ($) by multiplying the energy used by the price using a template sensor as the energy dashboard does that for you.

Great, I wasn’t aware that these helpers are awailable. You guys are developing too fast :grinning:
The description is now up to date, inclusive how to use mainly the grafical interface for the commissioning.