#Sensor to Energy Type I can use in the Energy Dashboard.

1 messages · Page 1 of 1 (latest)

dry vessel
#

I know this question has been asked 1000 times and I've been through various online guides but none solve my problem.

I have input as a sensor called daily_turbine_energy_2 -- This sensor is provided by LocalTuya and represents the current value in Watts that the Wind Turbine is moving through an RCD. This value is negative upon generation and positive on consumption.

I want to use this value in the Energy Dashboard in the same way I can with my solar panels.

I'm happy to list this as a "Solar Panel" if that's best practice or I can add it as an "Individual device" but that appears to be more about consumption than generation.

Any advice on steps I can take?

#

Device is the KETOTEK Smart Single Phase Energy Meter WiFi Electricity Power Meter 5(65) A 90-250V 35mm DIN-Rail Power Consumption Electricity Usage Monitor Digital Display Volt Amp Watt

crimson silo
#

You need to convert it from a power to an energy by using an integral helper. I don't think you need an intermediary template to flip the sign before feeding it into the energy dashboard as it's smart enough to deal with that.
You will need to register it as solar though as afaik there's no other real way to import power into the system (i guess you could have it as a battery if you really wanted to)

dry vessel
#

I used a Helper to create a Utility Meter; see

#

Is this the correct first step?

#

I try to use that helper as an input for Solar but it doesn't show it

crimson silo
#

no - the energy dashboard needs an energy value not a power value

#

that's why you need to use an integral helper to turn power into energy

dry vessel
#

okies, I've created the integral helper now

#

I get these warnings

#

I imagine they can be ignored

crimson silo
#

the negative state should be fixed - apparently it can't fix that

dry vessel
#

okies, I can flip it from negative to positive relatively easily and refgerence that in the integral. I assume this is the correct method?

crimson silo
#

should be, yes

#

otherwise you could use a template sensor to flip the sign of the integral

dry vessel
#

hrm, it might not be that simple, gimme 2 mins to confirm..

#

Note that these are now all positive values

#

I deleted the old integral and made a new one (in case of negative values being stored)

#

I'll give it a few mins to gather some statistics then check the dashboard...

#

thanks for your help btw, it looks like I'll need to wait for some wind to generate some energy to test this so... I'll come back w/ my findings.

dry vessel
#

Good progress but it has the unexpected device class

#

I'm not seeing an option in the UI to change class

#

I wonder if I need to change it on windturbinepositive sensor

#
  - platform: template
    sensors:
      windturbinepositive:
        unit_of_measurement: "W"
        value_template: "{{ states('sensor.wind_turbine_power') | int(0) | abs }}"
#

I changed to

  - platform: template
    sensors:
      windturbinepositive:
        unit_of_measurement: "W"
        value_template: "{{ states('sensor.wind_turbine_power') | int(0) | abs }}"
        device_class: energy
crimson silo
#

should be power not energy

dry vessel
#

ack, modified.

#
  - platform: template
    sensors:
      windturbinepositive:
        unit_of_measurement: "W"
        value_template: "{{ states('sensor.wind_turbine_power') | int(0) | abs }}"
        device_class: power
#

no warnings or errors so this looks positive 🙂

#

I'll wait 5 mins to see if the data shows up in the Energy Dashboard.

#

Thanks again

crimson silo
#

np

dry vessel