Powercalc - Virtual power sensors

See https://github.com/bramstroker/homeassistant-powercalc/issues/169. This is a similar request. You can add your idea there. This is a big complex feature request which will require lot of development effort. I will consider but can’t promise I will do it anytime soon.

Yes I also manage it this way. All my power sensors contained in a single package. It’s also a one time configuration. Most people are not adding new lights on a weekly basis.

1 Like

Thanks.

I cant get the system up and running for all lights without lut support. getting the following errors:

2021-09-11 10:24:55 ERROR (MainThread) [custom_components.powercalc.sensor] Skipping sensor setup light.lightstrip_wohnzimmer: Model not found in library (manufacturer: Signify Netherlands B.V., model: LCL002)
2021-09-11 10:24:55 ERROR (MainThread) [custom_components.powercalc.sensor] Skipping sensor setup light.lightstrip_klavier: Model not found in library (manufacturer: Signify Netherlands B.V., model: LST002)
2021-09-11 10:24:55 ERROR (MainThread) [custom_components.powercalc.sensor] Skipping sensor setup light.lightstrip_esszimmer: Model not found in library (manufacturer: OSRAM, model: Plug 01)
2021-09-11 10:24:55 ERROR (MainThread) [custom_components.powercalc.sensor] Skipping sensor setup light.deckenlampe_esszimmer: Model not found in library (manufacturer: 3A Smart Home DE, model: LXN-1S27LX1.0)
2021-09-11 10:24:55 ERROR (MainThread) [custom_components.powercalc.sensor] Skipping sensor setup light.kristalllampe: Model not found in library (manufacturer: OSRAM, model: Plug 01)
2021-09-11 10:24:55 ERROR (MainThread) [custom_components.powercalc.sensor] Skipping sensor setup light.stehlampe_klavier: Model not found in library (manufacturer: OSRAM, model: Plug 01)

my configuration looks like this:

  - platform: powercalc
    entity_id: light.lightstrip_klavier
    mode: linear
    linear:
      min_power: 0.3
      max_power: 20.0
  - platform: powercalc
    entity_id: light.lightstrip_esszimmer
    mode: fixed
    fixed:
      power: 20.0
  - platform: powercalc
    entity_id: light.deckenlampe_esszimmer
    mode: fixed
    fixed:
      power: 50.0
  - platform: powercalc
    entity_id: light.kristalllampe
    mode: fixed
    fixed:
      power: 15.0
  - platform: powercalc
    entity_id: light.stehlampe_klavier
    mode: fixed
    fixed:
      power: 20.0

no idea what is missing/wrong with that.

This is actually a bug which I fixed yesterday see https://github.com/bramstroker/homeassistant-powercalc/pull/214. However the fix is not released yet. Will release a new version 0.7.0 containing this fix today. You can remove mode: fixed, mode: linear from configuration, this will be automatically set correctly.

edit
Just released v0.7.0. Let me know if this solves your issue.

you are great, working fine now :slight_smile:

1 Like

Is it possible to to /powercalc/data own folder?
I just have few Gledopto bulbs that probably are similar to some Signify bulbs just I will made some small modifications to Signify files. Temporary solution for me.

I did it, in fact, but update deleted my folders.

Yes. have a look at custom_model_directory

Oh, I overlooked it, sorry.
Two more Q:
A. Do I need to add an entry for every sensor or can I use it as a global configuration?
B. Can I put that subfolder with custom light models into /powercalc/data/ directory? Or it will be erased during the update?

A. Do I need to add an entry for every sensor or can I use it as a global configuration?

Yes you need to add the setting for each sensor you want to have use a custom light definition for

B. Can I put that subfolder with custom light models into /powercalc/data/ directory? Or it will be erased during the update?

You have to put it in a subdirectory under your home asssitant config directory, when you put it in /powercalc/data it will be overwritten next update.
So you could create config/powercalc_custom_models/my_light for example.

1 Like

Is there also an overview of manual settings for devices which are used by many people, like e.g. Google Nest speakers. That would make it more easy to add those, so not everybody has to measure outputs themselves if they want to add it.

1 Like

No, not yet. Maybe I will consider into extending the light model library with other kind of devices/appliances, but I have not plans on doing that short term yet.

Maybe another discussion subject on GitHub where users can share their settings?

Yes that would be a good idea for the time being. Do you have a suggestion for the category name? “Share your config”?

Sounds good to me!

I have added the category

i m trying to use create_group, but getting error in HA.
I thought i can use create_group, instead of using sensor template to add and group the individual sensors?

sensor:
  - platform: powercalc
    create_group: All hallway lights
    entities:
      -  entity_id: light.hall
      -  entity_id: light.kitchen
         fixed:
           power: 12

the above give me following error in HA

Invalid config for [sensor.powercalc]: [create_group] is an invalid option for [sensor.powercalc]. Check: sensor.powercalc->create_group. (See ?, line ?).

Just looking at GitHub and I think this might not be available until v0.8. You could switch to the “master” version if you want the functionality now.

2 Likes

v0.8.0 has been released which also contains the new feature to create multiple entities at once and automatically add a group sensor.

1 Like

Love the panel! Can you post the card setup? Thanks

After upgrading to 0.8.8 I started to have error:

ERROR (MainThread) [custom_components.powercalc.sensor] Skipping sensor setup light.witryna_1_4c: Model not found in library (manufacturer: gledopto-qba, model: LCT003)

config:
image

files:
image

Bug or something wrong on my side?