Auto discovered entities not listed in integration panel?
Just started to migrate my pure Yaml config to a UI config where possible.
Not sure if I ran into a bug, but auto-discovered entities are created correctly, but are not listed in the Powercalc integration panel on config/integrations
that way, we can not edit them in the UI, which was one of the main reasons for me to migrate in the first place.... ofc we can do that in the developer-tools/state but it would really be very convenient if Powercalc followed generic practice of listing auto-discovered entities in the Integration panel to which they belong?
Also, makes me wonder what the difference is between hand made entities in the UI (that do show up there) and the auto discovered ones.
Lastly, there is no mention in the frontend of 'We have discovered new entities, check it out?'
thanks, Marius
btw, HA 2022.8.2, Powercalc 0.24.8
Currently, yes. the GUI is limited to only setup manual entries yet. Not the autodiscovered ones. Leaved it out for first iteration of the config flow. I will definitely have a look into this and planning to do this in the future, but it is complicated. After I even manage to get it implemented also I need to make sure it doesn't break existing installations. So, yes, it is on the roadmap, but not short term.
I see, cool its on the radar.
btw, before I tried the auto discovery, I made a few manually, and among those was a perfectly fine recognized Tradfri TRADFRIbulbT120E27WSopal470lm bulb (believe I have a request for that one). So, because it was correctly recognized and confirmed in the config flow, I believed it was in the LUT.
Which, upon next restart, appeared that it wasnt...
somehow I feel it would be good if the config flow reports that back (and maybe even allow an override with another available model.) That's what I do in. the manual set up:
- entity_id: light.corridor_pool
model: LED2003G10 #fake TRADFRIbulbT120E27WSopal470lm
which should come close.
if I may here:
ive been busy adding all lights, and grew tired of having to select Lut all the time, so I changed that to be the default method in the flow:
vol.Optional(
CONF_MODE, default=CalculationStrategy.LUT
): selector.SelectSelector(
selector.SelectSelectorConfig(
options=[
CalculationStrategy.FIXED,
CalculationStrategy.LINEAR,
CalculationStrategy.WLED,
CalculationStrategy.LUT,
],
Seems many users would benefit there. Though I can see different scenarios...... would it be possible to have a configurable default for those importing sessions? I mean, ill spend the better part of the morning importing my lights via LUT. But up next will be a lot of Fixed devices. Would be nice if we could switch between default methods for that.
Ill be glad to add it to the discussions if you think it valid
I see, cool its on the radar.
btw, before I tried the auto discovery, I made a few manually, and among those was a perfectly fine recognized Tradfri TRADFRIbulbT120E27WSopal470lm bulb (believe I have a request for that one). So, because it was correctly recognized and confirmed in the config flow, I believed it was in the LUT.
Which, upon next restart, appeared that it wasnt...
Yes this definitely looks like a bug. I also saw that when doing some development on the config flow last weekend. I will create an issue and resolve this soon.
if I may here:
ive been busy adding all lights, and grew tired of having to select Lut all the time, so I changed that to be the default method in the flow:
vol.Optional( CONF_MODE, default=CalculationStrategy.LUT ): selector.SelectSelector( selector.SelectSelectorConfig( options=[ CalculationStrategy.FIXED, CalculationStrategy.LINEAR, CalculationStrategy.WLED, CalculationStrategy.LUT, ],Seems many users would benefit there. Though I can see different scenarios...... would it be possible to have a configurable default for those importing sessions? I mean, ill spend the better part of the morning importing my lights via LUT. But up next will be a lot of Fixed devices. Would be nice if we could switch between default methods for that.
Most of the lights using the LUT strategy should be autodetected. The config flow was meant in the first place to just to eadily add these fixed and linear sensors. So I don't think LUT as the default would be the right choice.
I don't want to complicate things more than necessary by introducing some option to let the users choose the default. Have enough stuff to maintain and support already ;-). Also it's only a one time setup to do 10's of lights. After that it doesn't matter that much. When auto discovery is also implemented in the GUI way, you only have to click accept.
ok, understood ;-)
one more thing then please: the cresting a group in the config flow, I was a bit surprised only to be able to add energy and power sensors, and not lets say 3 lights, like we could do in the yaml config
- create_group: Dining table
entities:
- entity_id: light.dining_table_lamp_1
- entity_id: light.dining_table_lamp_2
- entity_id: light.dining_table_lamp_3
now is created in the UI a much more complicated way:

is that correct, or am I missing something obvious?
and finally, when creating entities in the config flow, we select current entities in the HA system. What happens when we change name or entity_id of those entities? Will the Powercalc config follow that automatically (based on some device_id) or need we adapt manually.
ok, understood ;-)
one more thing then please: the cresting a group in the config flow, I was a bit surprised only to be able to add energy and power sensors, and not lets say 3 lights, like we could do in the yaml config
- create_group: Dining table entities: - entity_id: light.dining_table_lamp_1 - entity_id: light.dining_table_lamp_2 - entity_id: light.dining_table_lamp_3now is created in the UI a much more complicated way:
is that correct, or am I missing something obvious?
That's correct. It's because in the YAML approach I have all the data available to directly create both the group and underlying power/energy sensors in one go. In the GUI approach the power sensor needs to be setup first (as I don't know what kind of configuration options it needs to have). Then later after setting it up you can bind it to the group. However I have 2 improvements which I want to implement this weekend which should make things easier.
- When the power sensor is made by powercalc I know which energy sensors corresponds, so I can automatically include that in the group, which eliminates the need to supply both the power and energy sensor. You'll still need to do that when you want to include an existing power and energy sensor in the group, for example from a Zwave plug.
- Add a group selection in the virtual power sensor creation, so you can automatically include the new sensor to existing groups.
and finally, when creating entities in the config flow, we select current entities in the HA system. What happens when we change name or entity_id of those entities? Will the Powercalc config follow that automatically (based on some device_id) or need we adapt manually.
When the source entity_id name is changed and the sensors in powercalc have a unique_id the entity id's should automatically be renamed. Also when the source entity is bound to a device, powercalc will be bound to the same device, and this link will always stay in tact.
Started to work on this: #1115
Implemented and release v1.0.0-beta.1