You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This card is gorgeous, fantastic work! My suggestion is for those of us who are on leases -- I lease my vehicle and I use Home Assistant to keep track of how I am doing on my mileage relative to where I should be in terms of miles used given today's date. The way I do this is with a template sensor:
{% set start = as_timestamp("2024-06-01") %} {% set end = as_timestamp("2027-09-30") %} {% set tnow = as_timestamp(now()) %} {% set leased_miles = 30000 %} {{ (leased_miles * ((tnow - start) / (end - start))) - states('sensor.jeep_odometer_value') | round(0) }}
If the end result is positive, it means that I am under my "target" usage by that many miles (my target being 24.31 miles/day based on the number of days in the lease and the total miles I have paid for).
If the end result is negative, that means that I have exceeded my day's "target" usage by that many miles. Right now my sensor gives a value of -50, which means that I am 50 miles over where I should be given my daily allotment of miles. Towards the end of my lease, I will need to pay the dealer for the number of miles that the sensor shows as negative.
Currently I have it displayed as an entity card below the Ultra Vehicle Card, but it would be neat if some kind of lease mileage tracker could be incorporated. Great work on this card!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This card is gorgeous, fantastic work! My suggestion is for those of us who are on leases -- I lease my vehicle and I use Home Assistant to keep track of how I am doing on my mileage relative to where I should be in terms of miles used given today's date. The way I do this is with a template sensor:
{% set start = as_timestamp("2024-06-01") %}
{% set end = as_timestamp("2027-09-30") %}
{% set tnow = as_timestamp(now()) %}
{% set leased_miles = 30000 %}
{{ (leased_miles * ((tnow - start) / (end - start))) - states('sensor.jeep_odometer_value') | round(0) }}
If the end result is positive, it means that I am under my "target" usage by that many miles (my target being 24.31 miles/day based on the number of days in the lease and the total miles I have paid for).
If the end result is negative, that means that I have exceeded my day's "target" usage by that many miles. Right now my sensor gives a value of -50, which means that I am 50 miles over where I should be given my daily allotment of miles. Towards the end of my lease, I will need to pay the dealer for the number of miles that the sensor shows as negative.
Currently I have it displayed as an entity card below the Ultra Vehicle Card, but it would be neat if some kind of lease mileage tracker could be incorporated. Great work on this card!
Beta Was this translation helpful? Give feedback.
All reactions