Hi ,
I am trying to make a kind of fuel guage,
So i have a senssor that tells me when something is running
i want a way of initialising that sensor at a certain value (Ie the actual running hours of the engine)
so i have a real time running hours,
i also want a way to have a kind of trip meter , that i can reset , that i can use to calculate the fuel usage
so everyone time i fill up i can reset the hours on the trip meter , i i deally i could then have that in a list of previous hours to fuel usage etc so i can do a rough calcualtion on how much fuel i have left and the total cost
i have parts of it working like this
sensor engine_run_time:
- platform: history_stats
name: engine_run_time
entity_id: binary_sensor.engine_state
state: ‘on’
type: time
start: ‘{{ 0 }}’
#start: ‘{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}’
end: ‘{{ now() }}’
But do not know how i can set the initial value to say 550 hours
or reset when i refill the tank.
I hope this is understandable , i have tried a few different things , but just cant seem to get it
Thankyou for any help in advance