Hi,
I’m new to HA. I want to count operating hours of a device while its power consumption is above a chosen value.
Is it possible to “combine platform: history_stats” with conditions ?
Code:
Betriebsstundenzaehler Kamin
sensor:
- platform: history_stats
name: BhZaehlerPlug7Kamin
entity_id: switch.plug7_kamin
state: ‘on’
type: time
start: ‘{{ 0 }}’
end: “{{ now() }}”
condition:
alias: “Kamin Leistung akt > 30 W”
condition: numeric_state
entity_id: sensor.plug7_kamin_energy_power
above: 30
Thanks a lot!
prome