Energy Management in Home Assistant

Wasn’t able to find the information. I tried all kind of keywords searching these threads and in general on the forums. I was able to fix it editing the core restore file though.

Hopefully wont have to do the workaround in the future. lol

Sorry, I must confess I can’t find the post either.

1 Like

Hello,

I’m using the smappee P1/S1 meter with the cloud api to import my data into homeassistant.

The sensors are not showing in the new energy dashboard? Anyone here figured out how to integrate it in the energy dashboard?

What are the attributes and state of your energy sensor.

In my case I don’t record everything into the history database, si in ,my configuration I have something like:

recorder:
  purge_keep_days: 1
  #   purge_interval: 1
  include:
    domains:
      - device_tracker
      - switch
    entities:
      - binary_sensor.door_sensor
      - sensor.room_humidity
      - sensor.room_temperature
      - sensor.hall_temperature

where I select which entities I record and which ones I don’t, so even though HA was calculating the cost, it was not saving it to the database until I manually added them to the recorded list. But, as I said this is because I use the recorded funcitonality, which is not the default use case of HA.

1 Like

I have some Tuya devices that measure power (in W); and I am trying to represent that in kWh using the integration (Reiman sum integral). Set as follows:

- platform: integration
  source: sensor.tuya_tv_current_consumption
  name: tuya_tv_energy
  unit_prefix: k
  round: 2

The energy now shows in kWh as follows:

but when trying to select it from the energy dropdown, it is not showing. Am I missing something?

device_class: energy

Already tried that and it gives the error:

Invalid config for [sensor.integration]: [device_class] is an invalid option for [sensor.integration]. Check: sensor.integration->device_class. (See ?, line ?).

Do it via customization then.

1 Like

@dhaiby - very interesting - do you mind giving more details how you’ve integrated the energy meter and sonoff to allow the pulses to be counted? I currently have my energy meter (2,000 imp/kWh) to a Flukso which counts and presents the output via mqtt - I’m happy with this however I’m looking for a backup in case the Flukso dies.

You haven’t read the thread have you? Start at post one.

Who’s that post for, me?

yep sure is

Yeap, I’ve read the whole thread, thanks for asking, and I have this working fine on my system using a Flukso via mqtt. My question to @dhaiby was how did he connect a Sonoff to a Impulse counting Power Meter - his wiring diagram shows how you would connect a power meter in your switch box just after the main switch so that it measures power for the whole house - maybe you didn’t understand my question cause there’s no mention anywhere about this.

Impulse countine is dealt with in post 1.

Are you deliberately being unhelpful or what - post 1 talks in general terms that this can work with impulse counters, and I have it working using an impulse counter called a Flukso. Where in the first post, or any other post in the thread, does it describe how to connect a Sonnoff to a Power meter.

1 Like

Well I can see it. Search for glow.

As I thought, you have not understood my question. The glow part you refer to counts a flashing light on your meter. A power meter however has a built-in circuit that turns on an off rapidly - mine turns on and off 2,000 times per kWh. You connect a pulse counter device to terminals S0+ and S0- which counts how much power you’re using/generating. Again, my question is how did he connect a Sonnoff to termianls S0 and S1 cause I can’t see how a Sonnoff can do that.

1 Like

You are righr I did assume you were light pulse counting. My apologies for being sarcastic, and for the assunption.

A sonoff does have more gpios than the simple relay uses. A bit of hacking on the mb should connect to some of the gpios.

1 Like

Adding device_class: energy via customization works