Powercalc - Virtual power sensors

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

Thanks :grinning: Very usefull power consumpion calculator . How can i change 1,000.0 W to 1000 W ?

Screen Shot 2021-11-11 at 23.58.47

I see you got it working ;-). Not sure how you can change the thousands separator, this is not something powercalc does but more a frontend formatting thing of Home Assistant. Maybe someone else knows how to do it.

My guess is that is based on your homeassistant language but as bramski says that is only how it is shown the thousand separator isn’t in the data from powercalc.

1 Like