Hi,
Forgive me for being a novice. Have limited knowledge of YAML and have trawled through every topic I can but cant find the answer.
I want to create a timer that counts the duration that my engine has been turned on. The snag is that I am using an unscientific method of determining the engine being turned on. I have a voltage sensor named sensor.victron_battery_voltage and when it the engine is running I get a reading above 14 volts. I would like to count the duration that the sensor is above ‘14’ volts.
My attempt at making this work doesn’t produce any results. Please point me in the right direction!
- platform: history_stats
name: Engine on all history
entity_id: sensor.victron_battery_voltage
state: > 14
type: time
start: '{{ 0 }}'
end: '{{ now() }}'