Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106588

Counting operating hours under conditions

$
0
0

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

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106588

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>