Powercalc - Virtual power sensors

Grouping, is needed, and also specific names, then we also use the glob to exclude in recorder etv. :slight_smile:

image

Sorry, it looks it’s the friendly name you have changed, and not the “sensor” name

You are sure you did not set this friendly name yourself with the customize option in home assistent? I am sure I set the standard name (from which the entity id is generated). Could you enable and share debug logs?

have set the logs directly to you.

don’t do customization on the entritie you create.

They draw the same power when you extend them, the brightness will be lower at the same % if you compare it to a non extended version.

1 Like

Good to know. I can go back to measuring in about two weeks. I have lended out my Shelly.
Will do the strip I have at home and one at my company (which is also extended). Than I can also compare if they give similar readings.

1 Like

Just wanted to say after the update my Ambient Candles are working fine now.
I actually compared it with my AVM Dect 200 Plug and it’s pretty accurate. Only a difference by 0,3 watts.

:smiling_face_with_three_hearts:

1 Like

Just released next major version of the component v0.4.0.

Highlighted features:

  • The component now automatically creates a corresponding kWh energy sensor so you can directly add your virtual power sensors to the energy dashboard
  • 9 new light models are measured has been added to the library by users
  • Climate devices are now supported.
  • source_entity and source_domain attributes have been added to the power sensors. This allows you to easily create template sensors to sum the power off all your lights for example.

Let me know if everything works correctly for you guys.

3 Likes

Im updating. A config gas changed a lot?

What do you mean exactly? Config has not changed, your current config for setting up the power sensors should still work. there are some new configuration options, but these are all optional.

ive added power monitering to my lights with powercalc and seems to report correctly however it refuses to show any automatically generated energy consumption entities. I added these manually using the integration platform but it refuses to show units anything other than W.

Sensor:
  - platform: powercalc
    entity_id: light.lr
    linear:
      min_power: 0.5
      max_power: 9.5
    standby_usage: 0.2

  - platform: integration
    name: lr_energy
    source: sensor.lr_power
    unit_prefix: k
    unit: kWh
    method: left
    round: 3

I have been fighting this all day but nothing seems to work. anyone able to help?

With version 0.4 of powercalc it will create the integration sensor automatically for you.

Which version of powercalc are you running?
I would suggest to install the latest version, than remove the sensor lr_energy. Next restart HA. The sensor lr_energy should now be created and ready for use in the energy dashboard.

If not please check the logs and enable debug logging (see the readme).

magic! I only installed it the other day, must have been just before you released V0.4.
Still cant work out why the integration platform wouldnt show the right units but guess it dosnt matter now :slight_smile:

Thank you!

1 Like

… one of the lights have updated to correct units but the others are still showing W. im hoping if I give it some time it will sort itself out! !
image|474x460

Did you remove the energy (integration) sensors first?
Because the sensor was created with a wrong configuration in the past, it will look at the state and reconfigure with the wrong unit (that’s something the integration sensor does internally and I cannot change this behaviour). I don’t think waiting will fix the issue.
Maybe you even need to remove all the state of this sensors which is already in the database. Search the forum how to do this.

managed to fix by commenting out powercalc, creating new sensors with the same name and correct units then resetting. after reversing the process everything is now as it should be!

1 Like

I have a couple of Loxone Ceiling lamp and rgbw spots, how do you create LUT files for these?

I have a Loxone integration which I get all the lights in home assistant

Below the light details

min_mireds: 153
max_mireds: 500
effect_list:
  - Light 100
  - Light 50
  - light 25
  - Party
  - led fun
  - Uit
  - Alarm
supported_color_modes:
  - color_temp
  - hs
color_mode: hs
brightness: 160.65
hs_color:
  - 75.205
  - 57.255
rgb_color:
  - 218
  - 255
  - 108
xy_color:
  - 0.371
  - 0.503
uuid: xxxxxx.xxxxxx
room: Keuken
category: Verlichting
selected_scene: null
device_typ: LightControllerV2
plattform: loxone
friendly_name: Lamp Keuken
icon: mdi:hubspot
supported_features: 23
device_class: LightControllerV2

These LUT files are provided by hard work of other volunteers/contributors. Lights are measured by hand (only possible for brightness only lamps) or using a script.
When you have a smart meter and are a littlebit tech savy you should be able to create LUT files for these lights. See GitHub - bramstroker/homeassistant-powercalc: Custom component to calculate estimated power consumptio.
Otherwise you’ll have to wait for some other user to do it, or use the linear mode of the component to get an approximation. You’ll have to determine the min and max wattage by measuring (or looking at the manufacturer specifications).

@bramski i absolutely love this integration. I have a question around the energy sensor created.

Does it reset monthly or does it continue to aggregate?

Is it possible to have this configurable so that the energy sensor resets daily/monthly/yearly?

The sensor created by powercals is actually behind the scenes an integration sensor. This sensor will keep calculating and never resets.
When you want to cycle daily/monthly/yearly you can use a utility-meter sensor and use the integration sensor as an input for it.
Maybe I will add a feature to automatically create utility meters from within powercalc.

utility_meter:
  energy:
    source: sensor.livingroom_light_energy
    cycle: monthly
1 Like