Closed fxstein closed 1 year ago
Thanks for your detailed report, this is how an issue should be written ;-). When you create the individual entities and the groups in separate powercalc entries I think it will try to create the utility meters twice, resulting in this error. Best practice is to use the following configuration to define both the group and individual entities in a single entry. I have good hopes this will also resolve your error.
Could you try this:
- platform: powercalc
create_group: "Pionizer L3 Inverter 1 Solar Production"
unique_id: sensor.pionizer_l3_inverter_1_solar_production
entities:
- name: "Pionizer L2 Inverter 1 MPPT 1 Production"
unique_id: sensor.pionizer_l2_inverter_1_mppt_1_production
power_sensor_id: sensor.pionizer_l1_solax_api_inverter_1_mppt_1_power
- name: "Pionizer L2 Inverter 1 MPPT 2 Production"
unique_id: sensor.pionizer_l2_inverter_1_mppt_2_production
power_sensor_id: sensor.pionizer_l1_solax_api_inverter_1_mppt_2_power
- name: "Pionizer L2 Inverter 1 MPPT 3 Production"
unique_id: sensor.pionizer_l2_inverter_1_mppt_3_production
power_sensor_id: sensor.pionizer_l1_solax_api_inverter_1_mppt_3_power
Thanks for the tip. Will be testing today.
@fxstein were you able to test this?
Closing due to inactivity.
Hi,
I am getting some strange error messages when I attempt to create groups from real power sensors paired with powercalced energy sensors.
Am running the following versions:
At the highest level:
I am getting power sensors for various solar systems through their APIs, but no energy readings (don't get me started...). So I use Powercalc to calculate an energy sensor and a daily meter for it. Works great. I have set unique IDs by hand for now (will get replaced by serial numbers of the inverters...) to ensure I have a single set of uniqe sensors throughout the custom component I am working on.
The power sensors are defined like that (l0 sensors are the JSON response from the API):
For reference I have labeled the sensors as follows: l0 ... API call, l1 ... sensor mappings, l2 ... energy calculations, l3 ... energy and power aggregations...
They all work great. Getting them every 5 min.
Then I added Energy sensors like that:
together with global settings like this:
All of them work great as well, including the Daily utility meters.
The problems start when I try to add groups to aggregate the individual sensors at the inverter and system level.
Always result in the following errors:
I have tried it with and without unique id. If I remove the unique IDs, the group setup actually creates a second set of energy sensors by appending _2 to the l2 energy sensors.
Very much appriciate any guidance!