I’ve integrated my power and gas into the energy dashboard and really like it.
I’m also using a couple of gosund smart plugs via the LocalTuya integration and would love to integrate these as well. Unfortunately I can not get a custom sensor for these values to appear in the new device dropdown. I’ve tried making my own or using the Riemann sum integration but no luck.
My switch entity is: switch.washingmachine and has the following attributes
So as this might help somebody I will post my solution to this.
As I was not able to get it working with a template sensor I’m using a mqtt sensor where I post the value every 10 seconds. Then I use the integration sensor to convert it to kWh.
Here’s the yaml:
sensor:
# Power Plugs
- platform: integration
source: sensor.drucker_verbrauch
name: 3D Drucker Verbrauch
unit_prefix: k
method: left
round: 2
unit: kWh
- platform: mqtt
name: "Drucker Verbrauch"
unique_id: "stromverbrauch_drucker"
device_class: "power"
state_class: "measurement"
unit_of_measurement: "W"
state_topic: "powerwprinter/main/value"
value_template: "{{ value }}"