Powercalc - Virtual power sensors

These settings are YAML only currently. You can set this on global level in YAML that will make it apply to all GUI entries where you checked “Create utility meters”

You can add these to groups you create with the GUI.
On energy sensors you’ll need to add the kWh (rieman sensors)
And on power sensors the W sensors.

Apologies for the Noob question: I have successfully set up various sensors in the GUI, but one of the devices (Viera TV) doesn’t report an off state, only ‘unknown’.

I know I can configure “ignore_unavailable_state”, but can I configure this option in the GUI and if so, which bit (e.g power template)? If not, can I add it under Powercalc: in configuration.yaml without affecting any of the entries in the GUI, or is there another .yaml file I should be looking for?

Thanks,
Pete

Thanks a lot Bram,
It seems to work so far.

I’ve added it into configuration.yaml. However, the device doesn’t appear in the GUI. Is that normal behaviour? If so, I’m better off putting it all in YAML as I have some older style devices.

Im sure this have been asked before. I have been reading and searching in this thread, not able to find it.

I can not make the “All lights power” include the defined lights I have. Both the defined lights in the below yaml works, they show the right power when turned on, however they are not included in the “All Lights power”. I can not figure out how, or figure out how to update the “All lights power”. For all the automatic found lights, the “all lights power” works.

- platform: powercalc
  create_group: Powercalc All lights
  include:
    domain: light

- platform: powercalc
  entity_id: light.kaelder_loftlys
  standby_power: 0.3  
  fixed:
    power: 20

- platform: powercalc
  entity_id: light.garage_loft_lys
  standby_power: 0.3
  fixed:
    power: "{{ states('sensor.garage_loft_lys_power') }}"

entities you setup with the YAML won’t appear in the GUI, it’s just a completely other method.
I will maybe add this option to the GUI, in the advanced step.
But currently yes if you need this YAML is your only option.

1 Like

Only auto discovered lights will be included with the include option. That’s a restriction because of order in which things are loaded in HA.

You can combine entities en include however like this:

- platform: powercalc
  create_group: Powercalc All lights
  include:
    domain: light
  entities:
    - entity_id: light.kaelder_loftlys
      standby_power: 0.3  
      fixed:
        power: 20

It is a fantastic integration! Thank you.

1 Like

Just a headsup. I have added the possibility to set more “advanced” settings in the GUI. This also contains the ignore_unavailable_state setting.
This is included in the latest v1.0.0 beta. Release v1.0.0-beta.13 🌈 · bramstroker/homeassistant-powercalc · GitHub

Many thanks for the beta update. That works very nicely.

I am using groups and utility meters in the GUI, but I would like to add Peak and Off Peak tariffs. I have done this in configuration.yaml for another sensor, which works OK. Is it possible to add a list of tariffs to the GUI, or can I ‘append’ to the GUIs created meters with the required sub sensors?

#### Utility Meters #####
utility_meter:
  ashp_daily_energy:
    unique_id: ashp_daily_energy
    source: sensor.shellyem3_485519c9a766_channel_a_energy
    cycle: daily
    tariffs:
      - peak
      - offpeak

somehow I missed a lot of updates! was still on beta 3, and now see this…

anyways, nice to have google home minis available, Ill add mu measurements for google hub and maybe even apple iPod :wink:

on the ignore_unavailable_state, Id really love to see that on the globe config, so all of groups (hue lights switched off from actual power) wouldn’t need that individually.
Would you accept a FR for the GitHub - bramstroker/homeassistant-powercalc: Custom component to calculate estimated power consumption of lights and other appliances on that option?

You can set in YAML on global level:

powercalc:
    utility_meter_tariffs:
        - peak
        - offpeak

This will also apply to all powercalc configurations made with the GUI.

Yes, you can make a FR.

Instructions how to measure smart speakers are here. See Measure smart speakers

1.5 year ago I started prototyping based on some ideas and discussions in this topic. This quickly grew into a working integration which I added to HACS. Got more and more traction in the community and lots of people joined in to provide measurements to the device library or contribute in other ways. More and more features have been added along the way.
Today we are finally ready for a V1.0 release which should be available in HACS now.
Thanks everyone who has contributed (over 85 people now), you are amazing!

11 Likes

Hi,

I suddenly have negative values for some of my daily energy sensors

I have updated today to the most recent version but I can’t tell if that was before I have update as well. Was some time that I have checked these sensors.

Any advice what the reason could be?

Thank you!

Could you please create an issue on github?

Ok, will do that. Thank you.

Whats the reason for including Fibaro / Qubino Wall plug / smart plug which already have power metering?

To get insights into the self usage of the smart plug / wall switch. Most of these plugs have no option to include that but only return the power of the connected device.