Closed a-waider closed 3 years ago
Yes this is possible, but you need to add some custom sensors to convert the power values to energy. This is possible using this template sensor Energy Template I added my sensors from the configuration.yaml below:
sensor:
- platform: integration
source: sensor.energymanager_power_consumed_from_grid
name: energy_from_grid
unit_prefix: k
round: 2
- platform: integration
source: sensor.energymanager_power_export_to_grid
name: energy_to_grid
unit_prefix: k
round: 2
- platform: integration
source: sensor.energymanager_power_consumed
name: energy_consumed
unit_prefix: k
round: 2
- platform: integration
source: sensor.energymanager_pv_power
name: energy_produced_pv
unit_prefix: k
round: 2
After adding these it can take some time for them to show up in the energy config (i think it needs to collect some values before they show up)
Thanks! I added it just now and will test it tomorrow.
So I added the sensors for the myreserve battery with the following coniguration.yaml
:
sensor:
- platform: integration
source: sensor.energymanager_power_consumed_from_grid
name: energy_from_grid
unit_prefix: k
round: 2
- platform: integration
source: sensor.energymanager_power_export_to_grid
name: energy_to_grid
unit_prefix: k
round: 2
- platform: integration
source: sensor.energymanager_power_consumed
name: energy_consumed
unit_prefix: k
round: 2
- platform: integration
source: sensor.energymanager_pv_power
name: energy_produced_pv
unit_prefix: k
round: 2
- platform: integration
source: sensor.energymanager_myreserve_power_in_from_producers
name: energy_battery_from_producers
unit_prefix: k
round: 2
- platform: integration
source: sensor.energymanager_myreserve_power_self_supplied
name: energy_battery_supply
unit_prefix: k
round: 2
But I can only see the following sensors in my energy dashboard:
I also got following warnings in my homeassistant logs:
2021-09-07 11:09:24 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.energy_to_grid (kWh) does not match the unit of already compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None
2021-09-07 11:09:24 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.energy_battery_from_producers (kWh) does not match the unit of already compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None
Do you know how to delete the long term statistics of energy_battery_from_producers
and energy_to_grid
?
I tested it myself and ran into the same issue, found this thread on how to fix it by manually editing the database
Btw, I´m currently working on integrating the energy stats, which the energy manager keeps itself. This should fix this problem and also provide better stats instead of the calculated ones through homeassistant
Okay nice, then I'll wait for your new release
Hi is just released version 0.2 which adds the new energy sensors I hope you can successfully integrate them in your setup
Nice work so far 👍 I've noticed some improvements/some things that are unclear to me:
energy_buffered
and energy_released
? Could need some explanaition to these entities.profit_kwh_to_grid
and cost_kwh_from_grid
get the values?energy grid into storage
into energy from grid into storage
(const.py:204)I have not found any official documentation on the meaning of all values, so i had to guess from their json names and how the values correlate with each other, so the explanations below are my best guess :)
energy_buffered
is the sum from all sources into the myreserveenergy_released
i think is the sum of all energy to the gridprofit_kwh_to_grid
and cost_kwh_from_grid
are returned by the energy manager, i think they were set by your installerI track the myreserve as following in the energy dashboard: -> sensor.energy_consumed_storage -> battery out -> sensor.energy_from_pv_into_storage -> battery in
This only tracks pv -> storage -> house, but i dont really care about grid -> storage (sensor.energy_grid_into_storage
) or
storage -> grid (sensor.energy_to_grid_from_storage
) because these are very small amounts for my setup
Thanks for the hint with the naming, i added a couple missing from
to some names to make them more clear in the next release
Thanks for pointing that out to me. I added the entities like you suggested. I'm closing this now since I believe that this issue has been resolved. Thanks again.
Hi there,
nice work with this integration :)
Is it possible to use this integration to provide data to the energy dashboard?