I can’t get this to work, even with the simplest configuration. I would like all my lights into one entity for Energy, but the grouping always fails with “Unknown”. Single sensors work nicely.
Could you enable debug logging for powercalc? See the readme last section. Than check the logs for errors and clues.
Does the power sensor work correctly? Or is that one also unknown?
“No entities could be resolved” The power entity doesn’t work either. I tried it now with several confirmed light groups. It works fine with single entities.
As @OzGav correctly indicated min_power and max_power should be indented.
When it is still not working there should be an error in the logs indicating what is wrong.
Got it to work. the only issue i’m seeing is i have the sensors in my dashboard and the only way i can get a updated value is to restart the server. did i miss something or is this ment to happen?
No this is not supposed to happen. Which values are you referring to, the watt value of kWh?
Watt values should update realtime whenever you change the light brightness, for example light.computer_room_light
go no issue with the live watts part of the powercalc. but the total consumed (energy)(sensor.computer_room_switch_energy and sensor.server_rack_switch_energy) dont update ntil i restart the server
Could be you have to wait a bit for that to update. Just leave your HA instance running, those should update eventually. When the power value does not change powercalc forces a state change every 15 minutes to make the energy sensor update. When the power value changes (for example when you change brightness) the energy sensor should also update.
The energy sensors are just a Riemann integral sensore.
I may be doing this wrong, but after having installed Powercalc via HACS, nothing happens. If I understand your documentation correctly, Powercalc should automatically detect any entities which support auto configuration, but I’m not seeing any.
Do I need to add a line of two to my config?
Did you restart HA after you installed powercalc?
You could also enable debug logging, maybe that gives some clues (see last section readme).
You sure you have any lights from the supported models list?
No you don’t have to do any additional installation through HA integration manager. Only install the component via HACS is enough.
You could try adding configuration for 1 light manual and see if that works.
When you did enable debug logging you should see a line “Start auto discovering entities”, followed by a lot of information.
edit
I’m pretty sure autodiscovery was disabled by default as it is a new feature, and was requested to be disabled by some users. Will be enabled by default in the future.
Try adding this to configuration.yaml:
powercalc:
enable_autodiscovery: true
Will make this the default soon or update readme to avoid confusion.