Powercalc - Virtual power sensors

That is a picture from the supervisor add-on store. Powercalc is not an add-on !

image

Use HACS :

I get:

running:

Version core-2021.10.4
Installation Type Home Assistant OS
Development false
Supervisor true
Docker true
User root
Virtual Environment false
Python Version 3.9.7
Operating System Family Linux
Operating System Version 5.10.17-v8
CPU Architecture aarch64
Timezone Europe/Copenhagen

You should go to the ā€œIntegrationsā€ tab, seems you are on the frontend tab. Then you should find the integration when searching for power.
You donā€™t have to add any custom repository. powercalc has been added to the default HACS repository which is build in.

2 Likes

I found it thanks!

I have a ledstrip which is color only (no white leds). I use model.json supported_modes as lut. For that in directory I have only hs.csv.gz file. My log is missing color_tmpe file.

ERROR (MainThread) [custom_components.powercalc.sensors.power] Skipping sensor setup light.lightstreep_c_witryna_n: ('No lookup file found for mode', 'color_temp')

Is this file necessary in my case?

Currently yes, this is mandatory. Because powercalc looks at the supported color modes of the light. Regarding to HA this light also supports controlling the light in color temperature mode.
I will see if an option can be added to model.json file to override this behaviour.

edit
You could also just add a empty color_temp.csv.gz file, that should get rid of the error.

Thank You.
If I understand, file must have at least a header row but could be .csv (not gzipped mandatory)?

gz is not mandatory. Or just copy a color_temp.csv.gz from a model from the build in library. It wonā€™t be used in your case, so it doesnā€™t matter which values are in the file.

1 Like

I do have still errors with powercalc but have no idea in that case where to start to search.

Do you know which entity is causing the problem? And could you share the relevant configuration entry?
Also could you please create a bug report in the github repository?

Unfortunatelly, I have no clue which entity cause it. Log do not precise it.

Bug report created.

1 Like

Right now when you are using the Hue Bridge you donā€™t have to specify manufacturer and model yourself, which makes it really easy to setup powercalc with the smallest amount of configuration.
I am investigating possibilities with other controllers than the bridge, and need input of you guys to realize this.
See Information requested from non Hue Bridge users Ā· Discussion #351 Ā· bramstroker/homeassistant-powercalc Ā· GitHub

I can give you some of this information, Iā€™m using conbee ll and Philips Hue gu10 white colour ambience, Philips Hue White Filament Single LED ST64 Bulb and Philips Hue Impress White and Colour Ambiance LED Smart Garden Wall Light.

Thatā€™s great! This is exactly what I am looking for. You can sent me a PM with the json.

Already on PM

happy to find this integration - just starting to get my energy consumption monitored to better use what will come from my houseā€™s roof soon.

just set up my first sensor (simple sonoff switching fixed load) and it mostly seems to work fine, but somehow i donā€™t get it into the ā€˜statisticsā€™. i see and can select the statistic for use in a card and the energy-dashboard - but thereā€™s just no data fed into it.

what am i missing? :thinking:

(fwiw - i can see data in the ā€˜historyā€™ of the sensor :man_shrugging:)

What do You mean ā€˜statisticsā€™? Card? Platform?
History is from the other database than statistics. And for Statistics

> it can take time for the sensor to start reporting data because some attribute calculations require more than one value.

1 Like

thanks, been too impatient indeed. works fine now.

Can i use powercalc to measure kwh from my room heater 1000W. Can powercalc calculate kwh from ON/OFF status.
Do i need Integration - Riemann sum integral or utility_meter ?

Sure this is one of the things powercalc can do.

You only need the following configuration:

sensor:
  platform: powercalc
  entity_id: switch.room_heater
  fixed:
    power: 1000

Powercalc will create a power sensor, which will show 1000 or 0 watt depending if the device is on or off.
Will also create a kWh sensor (which is just a riemann sum sensor)
And also utility meters will be created (daily, weekly, monthly)

1 Like