Missing Range (Petrol only)
See original GitHub issueLooks great so far, I’m currently using NR and Bluelinky so this is a great progression
There is a missing entity for me, the fuel range, signified in the vehicle data as dte: value:
unit: 3
is miles.
Also would it be possible for an option for the odometer to be in miles also ? No problem if not, I’ll just create a template sensor.
vehicle_data:
vehicleLocation:
coord:
lat: xxxxxxxxx
lon: -xxxxxxxxx
alt: 0
type: 0
head: 2
speed:
value: 0
unit: 1
accuracy:
hdop: 10
pdop: 10
time: '20210410224324'
vehicleStatus:
airCtrlOn: false
engine: false
doorLock: true
doorOpen:
frontLeft: 0
frontRight: 0
backLeft: 0
backRight: 0
trunkOpen: false
airTemp:
value: 01H
unit: 0
hvacTempType: 1
defrost: false
lowFuelLight: false
acc: false
hoodOpen: false
steerWheelHeat: 0
sideBackWindowHeat: 0
dte:
value: 106
unit: 3
tirePressureLamp:
tirePressureLampAll: 0
tirePressureLampFL: 0
tirePressureLampFR: 0
tirePressureLampRL: 0
tirePressureLampRR: 0
battery:
batSoc: 61
batState: 0
time: '20210410224323'
odometer:
value: 4175.7
unit: 1
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (12 by maintainers)
Top Results From Across the Web
Missing Fuel Range Info - Land Rover Enthusiast Forum
Since last week, the range info is gone from my display. It use to show next to the fuel gauge regardless of the...
Read more >Missing fuel | Volkswagen Eos Forum
If you fill up the gas tank, there's no leakage and fuel is used, it's not 'missing', but just got used up (inefficiently?)...
Read more >Range is missing 30 miles? | Tesla Motors Club
Stops you panicing even more when it drops below 300 miles. Set the display to % - just like a fuel gauge. Then...
Read more >How to get fuel and range screen back on in the CR-Vs?
Crazy Honda Chris*Cell: 319-540-7307Email: CrazyHondaChrisSales@gmail.com*Welcome to support my Facebook ...
Read more >Honda Civic 2012 Does Not Display Odometer, Average Fuel ...
For some reason my average fuel consumption, Range and odometer are not showing up, if you have the same problem this video is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It looks good to me. If it works, I’m good with the solution - many ways to get the same end result.
I’d probably import the “km” and “mi” strings from homeassistant.const but that’s just because I prefer importing the strings from there if they exist, and then have the following just after the imports in the file -
DISTANCE_UNITS = {1: LENGTH_KILOMETERS, 3: LENGTH_MILES}
and then instead of lines 93-96 I think you can just have:
self._unit = DISTANCE_UNITS[found_unit]
in a similar way to what was in my PR, but I’m fine with the way you’ve done it too.Sorry missed the log request. Anyway works great now. Thanks