Error: This entity has already configured a power sensor
See original GitHub issueAfter updating to 2022.8.0b0 today, I am getting an error in the log about already-configured power sensors for several entities:
This error originated from a custom integration.
Logger: custom_components.powercalc.sensor
Source: custom_components/powercalc/sensor.py:244
Integration: Powercalc (documentation, issues)
First occurred: 1:18:17 PM (9 occurrences)
Last logged: 1:18:17 PM
light.arc_lamp: This entity has already configured a power sensor. When you want to configure it twice make sure to give it a unique_id
light.ben_s_lamp: This entity has already configured a power sensor. When you want to configure it twice make sure to give it a unique_id
light.vanessa_s_lamp: This entity has already configured a power sensor. When you want to configure it twice make sure to give it a unique_id
Could not resolve any entities in group 'Bedroom Lamps'
light.downstairs_lamp_left: This entity has already configured a power sensor. When you want to configure it twice make sure to give it a unique_id
light.downstairs_lamp_right: This entity has already configured a power sensor. When you want to configure it twice make sure to give it a unique_id
Could not resolve any entities in group 'Downstairs Lamps'
light.office_desk_lamp: This entity has already configured a power sensor. When you want to configure it twice make sure to give it a unique_id
light.nursery_lamp: This entity has already configured a power sensor. When you want to configure it twice make sure to give it a unique_id
For what it’s worth, I recently changed my YAML configuration to remove manufacturer/model overrides for some, but not all, of these entities, all of which are Hue (Signify) bulbs. When I originally added them, there were no LUT files for those specific models, so I overrode the model number to force Powercalc to use LUT files for similar bulbs. I recently noticed that model-specific LUT files have been added, so I commented out those overrides assuming that Powercalc would simply use the other LUT files going forward. I did not notice an error message until I updated to 2022.8.0b0, but I suppose it’s possible that commenting out the manufacturer/model overrides has something to do with the error, and I simply did not notice until now.
The power and energy sensors appear to still be working correctly, but I would appreciate any suggestions for tweaking my configuration – either YAML or in .storage – to clear this error message.
The relevant YAML sensor configuration is pasted below for reference.
sensor:
- platform: powercalc
entity_id: light.arc_lamp
# manufacturer: signify
# model: LCT015 # (LUT file added)
- platform: powercalc
create_group: Bedroom Lamps
entities:
- entity_id: light.ben_s_lamp
# manufacturer: signify
# model: LWB010 # (LUT file added)
- entity_id: light.vanessa_s_lamp
# manufacturer: signify
# model: LWB010 # (LUT file added)
- platform: powercalc
create_group: Downstairs Lamps
entities:
- entity_id: light.downstairs_lamp_left
# manufacturer: signify
# model: LWB010 # (LUT file added)
- entity_id: light.downstairs_lamp_right
# manufacturer: signify
# model: LWB010 # (LUT file added)
- platform: powercalc
entity_id: light.office_desk_lamp
manufacturer: signify
model: LCA006 # (no LUT file yet)
- platform: powercalc
entity_id: light.nursery_lamp
# manufacturer: signify
# model: LCT015 # (LUT file added)
Issue Analytics
- State:
- Created a year ago
- Comments:10 (7 by maintainers)
Top GitHub Comments
@bramstroker thanks for fixing my config. Looks like i was very lucky with it and going version 24< “broke” something. I have applied your suggested code and now the error is gone. Thanks again!
@szatan81 You must configure like below. Each unique
entity_id
needs to be defined only once in the configuration. You can use nested groups to add the entity both to the “all lights” group and the specific light groups. Defining one first and later adding to a group was never documented and not supported, as it will cause various issues when because also order of loading can cause issues etc… It was a coindicence this was working before for you.