legoracers
(Daan Tholenaars)
August 10, 2021, 9:32pm
1
Hi,
I just bought a Sonoff Pow R2 and flashed it with ESPHome.
Everything works, the relay, the power, current and voltage sensors.
Now I want to add it to the new energy dashboard as a individual device, but it doesn’t show in the dropdown list.
When I click the “Why is my entity not listed?” option it explains the statistics need to be configured in the integration.
Is there any way to configure this? Or does ESPHome not support this (yet)?
nickrout
(Nick Rout)
August 10, 2021, 11:01pm
2
I don’t think ESPhome supports this. In any event for energy monitoring you need an energy sensor not a power sensor.
So make a template sensor integrating power to energy
Yes you can, using this:
If you have the power in Watts
- platform: total_daily_energy
name: "Total Daily Energy"
power_id: plug_power
filters:
- multiply: 0.001
unit_of_measurement: kWh
device_class: energy
or you can use this in HA:
4 Likes
legoracers
(Daan Tholenaars)
August 11, 2021, 6:40am
5
Thank you for your reply!
It now show up as an individual device
TripleJ
(Johnni Jakobsen)
August 19, 2021, 3:02pm
6
Hi Guys,
I have tried going the Riemann way to get my Tuya smart plug in the individual device section. Like so (it’s measured in W)
- platform: integration
source: sensor.office_power_current_consumption
name: office_power_total
unit_prefix: k
round: 2
it creates the sensor and looking in the developer tools it looks like this.
state_class: measurement
last_reset: '2021-08-19T14:49:20.279125+00:00'
source: sensor.office_power_current_consumption
friendly_name: office_power_total
icon: mdi:chart-histogram
it’s still not showing up in the dropdown. Am I missing something in my configuration file ?
1 Like
Maikl_Sh
(Maikl Sh)
August 19, 2021, 6:16pm
7
Try adding device class and changing last_reset.
Here’s an example
state_class: measurement
unit_of_measurement: kWh
friendly_name: PZEM 004T V3 Energy
device_class: energy
last_reset: '1970-01-01T00:00:00+00:00
Should be in the docs.
I have created a pull request.
esphome:current
← bvansambeek:patch-2
opened 09:00AM - 01 Jul 22 UTC
This adds an example to add device in the individual devices drop down list in t… he HA Energy Dashboard.
## Description:
**Related issue (if applicable):** fixes <link to issue>
**Pull request in [esphome](https://github.com/esphome/esphome) with YAML changes (if applicable):** esphome/esphome#<esphome PR number goes here>
## Checklist:
- [ ] Branch: `next` is for changes and new documentation that will go public with the next ESPHome release. Fixes, changes and adjustments for the current release should be created against `current`.
- [ ] Link added in `/index.rst` when creating new documents for new components or cookbook.