Added option to display odometer and speed in kilometers instead of miles.. Note for this to work the car CANNOT be returning already in kilometers.. So someone in a foreign country where it is in kilometers please test.
First of all thanks so much for making the change. One thing I'd like to note though, unless I'm doing something wrong, the battery range seems to still be in Miles as opposed to switching to kilometers. Unless of course I'm doing something wrong? I've tried it with metrics on or off. I seem to get the same results.
Now that Tesla is displaying tire pressure in the app at all times, I’ve been monitoring the data and it seems like they push “last known” tire pressure through the API at all times (haven’t been seeing any zeros). So the “last known tire pressure” attributes that you added previously probably aren’t needed. Doesn’t hurt to keep. Just calling it out.
Is there a reason that the “current” tire pressure attributes are set as strings (e.g. attribute "tire_pressure_front_left", "string") instead of decimals? I got a nail and a slow leak and didn’t notice right away because the car only showed a TPM warning below something like 35 PSI, so I’m trying to set up a notification if the pressure drops below a higher number (42 PSI maybe). I can’t use the “<“ operator in RM because these values are strings. I can use last_known_tire_pressure_XXX since these are decimals, which I guess would work fine (unless they get removed per my prior point ). I can change them to decimals in the driver and see what happens, but just thought I would check first.
the last_known are not string but decimal, so those are what you should be using in rules anyway as the others can be n/a when they are 0 (hence the string). On the other issue I will do some more digging and see if i dont see zeros they should be removed and changed over to decimal if that is the case. For now behaviour will not be any different if you are using last_known.
all in all i see no reason to change it even if what you say is true as it will break peoples rules (correctly using the last_known attributes) and it wont change anything for people who are as they are always the correct reading anyway.