Powercalc not tracking a conditional virtual power sensor

Hi
I’m having an issue in trying to monitor the energy consumption of my kettle.

Using a metering plug I saw that it draws 3k watts when heating water and it’s on a smart switch so I can see when the kettle is available (it auto switches off after 3.5 mins).

I created a virtual power sensor for my robo vacuum too and that works fine, but for some reason the kettle sensor isn’t being recorded at all.

I tested the condition in DevTools | template and it’s working correctly, returning “True” when both conditions are met.
Anyone have any ideas as to why it’s not recording it’s use?
(the only real difference is the use of "name: " in the YAML)

- platform: powercalc
  name: Kettle Energy Metering
  entity_id: switch.innr_plug_2_on_off
  calculation_enabled_condition: "{{ is_state('switch.innr_plug_on_off', 'on') and (states('sensor.frient_zhemi101_smartenergymetering')) | float > 3000 }}"
  fixed:
    power: 3000

1 Like

I have the same Problem:

  - platform: powercalc
    entity_id: sensor.dummy
    name: Computertisch-Mathias
    unique_id: ComputertischMathiasPowercalc
    calculation_enabled_condition: "{{ not is_state('light.wled_mathias_monitor', 'unavailable') }}"
    standby_power: 0.5
    fixed:
      power: 52

The enabled condition is not updating.

Ok, found my problem. The Template did not return “on” or “off”.
It now works with:

"{{ 'off' if is_state('light.wled_mathias_monitor', 'unavailable') else 'on'}}"