Have you added those devices to the energy dashboard settings? I found this didn’t happen automatically for me when I added energy monitoring plugs to HA.
Settings → Dashboards → Energy → Then on the far right there is a section for Individual devices where you add the various power monitoing devices for them to appear in the Energy dashboard.
The fact that they measure does not mean they show the correct data for the board, see above earlier comment.
Try adding something like this which uses the state of the other sensor having consumption in it.
- platform: integration
source: sensor.gosund_1_consumption
name: powerplug_gaming_ha
method: left
round: 2
unit_prefix: k
Note: I also had to add the other/consumption sensor as the value was in attribute so device > sensor-consumption > sensor statistics
- platform: template
sensors:
gosund_1_consumption:
friendly_name: "GosundPlug1 current consumption"
unit_of_measurement: 'W'
device_class: power
value_template: "{{ states.switch.gosundplug1.attributes.current_consumption }}"
Not using local tuya.
Strangly it would never work for me and kept giving a error that it cant be setup by the UI.
Dkarson devices aren’t added automatically you have to select them which is part of the energy dashboard setup.
The problem is that they dont show in the list so can not be added.
All feed back welcome though.
Vingerha i suspected i may have to add things manually.
Normally not a big deal but a much bigger pain in the but when it takes me 10 just to type this.
Thanks for the examples all be adding the plugs tom and finding out how many typing mistakes i can make doing so.
This doesn’t work for me at all - no matter what I do it seems.
I’ve added the latest Tuya plug-in (I’ve also tried tuya local (I gave up on that)) I’ve got 4 smart plugs that cannot be flashed to tasmota. I’ve got about 20 that are flashed and they are great!
So the Tuya plug; using the Tuya native plugin, brings the device into HA. If I click on the device I can then enable the “Current”, “Power” and “Voltage” sensors.
This, as we know, doesn’t allow them to be added into the energy dashboard (I still don’t understand why, when the data is there…)
I’ve then added, using this thread, the following to my configuration.yaml
- platform: integration
source: sensor.smart_plug_power
name: TUYASmart1
unit_prefix: k
round: 2
- platform: template
sensors:
smart_plug_power:
friendly_name: "TUYASmart1 Current Consumption"
unit_of_measurement: 'W'
device_class: power
value_template: "{{ states.switch.smart_plug_socket_1.attributes.current_consumption }}"
I’ve then rebooted and still nothing in the energy dashboard… Where am I going wrong!?
Hello did you got this working if yes how , I have the same problem I have 5 tuya Plugs wich show me energy consumption in the app , but I m not able to add them to the energy dashboard in HAS…
I need some step by step help if possible…
Home Assistant tracks the min, max and mean value during the statistics period. The state_class property must be set to measurement , and the device_class must not be either of energy , gas , or monetary
With regards to this, I have a similar situation with the Energy Meters in My Office.
Office Total is a Kasa HS110, while Front Office is an Aussie Arlec Switch based on the Tuya Platform.
I have mine running under LocalTuya, with an Integration Helper to derive kWh’s.
Obviously the LocalTuya device does not have the required state_class to use it in the Statistical Graphs.
Looking at both devices in the Developer Tools it would appear as though I could add the required state there by adding an State_class: measurement there as per the Kasa device.
Is this correct or is it not that simple given other information I’ve read around the place.