It was some months ago. I just tried some things now and you are (no surprise) right that maxrange will expose without units. I must have misremembered - sorry.
However, if you use sensor.xxxx_range_electric main entity without attribute, it gives the range (in miles in my case) but with the fixed suffix of ‘km’. It must have been this that threw me off as I was using a card that wouldn’t allow attributes, leading me to create a template instead. I honestly don’t remember which card type it was.
- entity: sensor.rangeinmiles
name: Miles range
icon: mdi:ev-station
title: EQC
- type: attribute
entity: sensor.wd70kwf_range_electric
attribute: maxrange
name: Range at 100%
- entity: sensor.wd70kwf_range_electric
Thanks - understood. Unfortunately, I’m in the oddball country that uses metric for most things except miles (but only for driving) and pints (only for beer).
Oh well, I’ll stick with my template solution which is working fine anyway. Appreciate your help as ever.
Hi. I did try searching for this, but I can’t find an answer. In the Mercedes Me app, I can find the location of my car. I can also get the location using the Alexa skill. Can I get the location in HA somehow?
Thanks
It’s on the map (as long as the car is not in one of your zones). You should have an entitiy device_tracker.XXX_device_tracker (XXX=your license plate or fin/vin)
this shows the travel of your car in the last 96h:
or use an automation to close the sunroof when you enter the home zone (I hate to wait for the sunroof closing when I would like to leave the car), or, or, or
alias: Close SunRoof when entering home zone
description: ''
trigger:
- platform: device
device_id: XXXXXXXX
domain: device_tracker
entity_id: device_tracker.XXXXXX_device_tracker
type: enters
zone: zone.home
condition: []
action:
- service: mbapi2020.sunroof_close
data:
vin: W1NXXXXXXXXX
mode: single
Thanks - it wasn’t there, but that may be because I just renewed my mercedes services. Now, the serviceintervaldays is missing from the odometer device - it was there previously, but not now (and is still showing in the Mercedes Me app).
serviceintervaldays is one of the attributes that are missing sometimes. Just try to restart your HA in 24h, very often it will get reported again. I have never found the reason but I assume that sometimes the API does not deliver the value. Same for starterbatterystate…
I noticed today that the integrated stopped working 2 days ago. I did an update of the component and tried to authenticate again with the latest version but I’m stuck with these errors. Anything I’m missing ?
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.websocket] Got notification: vepUpdates
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] Start _process_vep_updates
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] Full Update. XXXXXXXXXXXXXXXXX
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values Odometer for XXXXXXXXXXXXXXXXX called
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values XXXXXXXXXXXXXXXXX has incomplete update set - attributes not found
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values Tires for XXXXXXXXXXXXXXXXX called
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values XXXXXXXXXXXXXXXXX has incomplete update set - attributes not found
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values Doors for XXXXXXXXXXXXXXXXX called
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values XXXXXXXXXXXXXXXXX has incomplete update set - attributes not found
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values Location for XXXXXXXXXXXXXXXXX called
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values XXXXXXXXXXXXXXXXX has incomplete update set - attributes not found
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values Binary_Sensors for XXXXXXXXXXXXXXXXX called
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values XXXXXXXXXXXXXXXXX has incomplete update set - attributes not found
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values Windows for XXXXXXXXXXXXXXXXX called
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values XXXXXXXXXXXXXXXXX has incomplete update set - attributes not found
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values Electric for XXXXXXXXXXXXXXXXX called
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values XXXXXXXXXXXXXXXXX has incomplete update set - attributes not found
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values Auxheat for XXXXXXXXXXXXXXXXX called
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] get_car_values XXXXXXXXXXXXXXXXX has incomplete update set - attributes not found
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] _process_vep_updates - XXXXXXXXXXXXXXXXX - complete: True - Counter({'f': 1, 'p': 0})
2021-12-11 10:43:22 DEBUG (MainThread) [custom_components.mbapi2020.client] vepUpdates Sequence: 0
@ReneNulschDE Pretty much - and this is helping overcome the weird situation the UK is in - sometimes imperial, but mostly metric, but sometimes not so much.
HA is showing temperature for me in Degres C, but we drive using miles. So it’d be great if whatever the units of measurement that come back from the Merc API show up as the default.
Appreciate I’m being fussy - and trying to overcome something stupid, but I assume I’m not the only one (Fellow UK residents? Canadians??)
Could you give us some more insights about your car? (Region, Year) Does it work in the MB-App? The Firmware says “NoStar” - never have seen this before. Do you use the Mercedes Me Bluetooth Adapter in your car?
Thanks Rene, tried it but it did not help unfortunately. Not sure where this came from. Will have to check further if nothing else is blocking it as I do not see it writing the .mercedesme-token-cache file any more
Thanks for the hint… turns out the Adapter is faulty that removes one car until that is fixed. Next is my EQC - that has alot of data, but seems mismatched between Miles and KM