Wichtige Info

Die Inhalte, die du hier siehst stelle ich dir ohne Werbeanzeigen und ohne Tracking deiner Daten zur Verfügung. Trotzdem muss ich die Server bezahlen sowie Zeit in Recherche, Umsetzung sowie Mail Support stecken.
Um dies leisten zu können, verlinke ich in einigen Artikeln auf die Plattform Amazon. Alle diese Links nennen sich Afiliate Links. Wenn du dir mit diesem Link etwas kaufst, dann erhalte ich eine kleine Provision. Dies ändert jedoch NICHT den Preis, den du bezahlst!
Falls du mich also unterstützen möchtest, kannst du auf den Link zum Produkt klicken und hilfst mir dabei, dieses Hobby weiter zu betreiben.
Da ich Keine Werbung schalte und keine Spenden sammle, ist dies die einzige Möglichkeit, meine Systeme und mich zu finanzieren. Ich hoffe du kannst das verstehen :)



Use Homeassistant MQTT Sensor for Energy Dashboard


Introduction:

I want to say Intermediate use MQTT in Homeassistant to track total consumption. With normal import, however, I could not select the sensor. In the following, I would like to briefly show, which could fix the problem. In my case, correct categorization has fixed the error.
In the I had shown how to add MQTT sensors in Homeassistant.
Unfortunately, these sensors cannot be used in the Enegerydashboard by default, so I will show how to fix this problem. IMPORTANT: With me the categorization of the sensor was the solution, but it doesn't have to be the same with you.

actual state of the sensor

At the moment the sensor in the config.yaml looks as follows:

- platform: mqtt name: "mainEnergyMeterTotalConsumptionForwardKwh" uniqueid: sensor.mainenergymetertotalforwardconsumptionkwhnew statetopic: mainPowerMeter/forwardenergy/counted/total unitof_measurement: "kWh"

Adjustment of sensor:

In this case, I would like to integrate my EnergyMeter if a different system or another type of sensor is to be integrated, the KJonfiguration must be adapted to the respective sensor. More information here, here and here .

My sensor looks like the following:

- platform: mqtt name: "mainEnergyMeterTotalConsumptionForwardKwh" uniqueid: sensor.mainenergymetertotalforwardconsumptionkwhnew statetopic: mainPowerMeter/forwardenergy/counted/total unitofmeasurement: "kWh" device: configurationurl: http://192.168.1.76/ identifiers: "nodework.mainEnergyMeter01" deviceclass: energy stateclass: total

Important here are the keys “deviceclass and “stateclass”. The attribute “deviceclass” must be energy in my case as I integrate my intermediate current meter and as stateclass I chose “total” as my measured value is an absolute value and represents current consumption (in kWh). If I track my live consumption, the class would be “measurement”.
With me, the class “total_increasing” would also be possible, as the measured value should only rise, but I do not yet know if a later balcony power value can go negative when fed in.
After adjustment, Homeassistant must be restarted and then the sensor should appear in the dropdown.


Back…