uvejota / edistribucion

Home Assistant custom integration for e-distribución
GNU General Public License v3.0
20 stars 6 forks source link

Sensor energy_yesterday_detail #14

Closed JJoaquinrl closed 3 years ago

JJoaquinrl commented 3 years ago

Hello, first of all thanks for your great work. I would like to be able to have the energy_yesterday_detail sensor but it gives me an error, the idea was to make a counter so that it would add up so much peak, valley etc. I have tried but it has always given me an error. All the best

uvejota commented 3 years ago

I'm enabling that feature on the upcoming version, along with async updates, and also pvpc bill estimation!

You can test v1.0.5-beta in https://github.com/uvejota/edistribucion/releases/tag/v1.0.5-beta until then. It currently support what you are looking for (but in 3 sensors, one per each phase (energy_yesterday_p1, energy_yesterday_p2, energy_yesterday_p3).

More details at:

...
    explode_sensors: # optional, to define extra sensors (separated from sensor.edistribucion) with the names and content specified below
      - cont # total counter energy in kWh
      - power_load # power load in %
      - power_limit # power limit in kWh
      - power # immediate power in kWh
      - energy_today # energy estimation for today in kWh
      - energy_yesterday # energy consumed yesterday in kWh (it may require a few hours to reflect the accumulated energy)
      - energy_yesterday_p1 # same for p1 phase
      - energy_yesterday_p2 # same for p2 phase
      - energy_yesterday_p3 # same for p3 phase
      - cycle_current # energy estimation for current billing cycle in kWh (it may require a few hours to reflect the accumulated energy)
      - cycle_current_p1 # same for p1 phase
      - cycle_current_p2 # same for p2 phase
      - cycle_current_p3 # same for p3 phase
      - cycle_current_daily # daily average
      - cycle_current_days # days in the cycle
      - cycle_last # energy estimation for the last billing cycle in kWh (it may require a few hours to reflect the accumulated energy)
      - cycle_last_p1 # same for p1 phase
      - cycle_last_p2 # same for p2 phase
      - cycle_last_p3 # same for p3 phase
      - cycle_last_daily # daily average
      - cycle_last_days # days in the cycle
      - power_peak # highest power peak in kW during the last 12 months
      - power_peak_date # the date
      - power_peak_mean # mean of monthly power peaks in kW during the last 12 months
      - power_peak_tile90 # percentile 90 of monthly power peaks in kW during the last 12 months
JJoaquinrl commented 3 years ago

Thanks for your prompt response. Well, I'm going to test that beta. I said, thanks for your work and greetings from Zaragoza

JJoaquinrl commented 3 years ago

Tested and working, but I think you have an error in power_peak_date. I had to delete it so that it did not give me an error

uvejota commented 3 years ago

Publicly available (also fixing the error you mentioned) at: https://github.com/uvejota/edistribucion/releases/tag/v1.1