Counting operating hours under conditions

Please have a read of point 11 here.

Create a template binary sensor that is on when your power is above 30W.

Then use that binary sensor in the history stats integration.

template:
  - binary_sensor:
      - name: "Kamin Leistung akt > 30 W"
        state: "{{ states('sensor.plug7_kamin_energy_power') | float(0) > 30 }}"
        device_class: power
1 Like