Ah thank you Rene. A simple mistake which really had me head scratching. I think its an age thing
Many thanks.
Ian
Ah thank you Rene. A simple mistake which really had me head scratching. I think its an age thing
Many thanks.
Ian
Hi Rene,
That seems to be working great as of now with the new Asia-Pacific setting. Good to see you can add AU to your supported list now
Excellent component Rene, thank you.
I installed today to pair with my new EQC. I got one, then 4 then 8 then 11 entities, which is great.
One issue is that Mercedes has screwed up in sending range, trip and odometer data always with km as units, even when you have set the car to miles. On MBUX and MercedesMe, the data is correctly shown, but in the entity, it always has the km suffix. My workaround is to create a partner entity in node-red without the units suffix.
Just for clarity, if the car says the range is 180 miles, the data is transferred as 180 km. There’s no conversion.
Does anyone know if this is particular to EQC or all MB?
Does your HA instance use imperial or metric? When you first installed HA you selected this.
Most components are automatically converted for you based on this setting, if applicable.
However In the MB app (North America at least) you have speed - km/h or mph, fuel - km/l or mpg, temp Celsius or Fahrenheit, and pressure -bar/psi. Have you selected your preference under settings?
Yes. It’s a UK model and arrived set up for our unique mix where we use miles for range, trips and economy, but metric for distance to intersections and temperature, etc. This is normal for all car manufacturers.
The values are displayed correctly in the car and on the MercedesMe App, but in the data transferred into HA, (see object below), the ‘units’ value is miles.
If I use this entity in lovelace, the 187 (below) appears always as ‘187 km’. You cannot apply units to it or a suffix. It always shows km even though it is 187 miles. As I said I used node red to pick out the attribute and store it in a new entity, but this is cumbersome and inefficient.
{"_msgid":“cb0efcfb.b7e0d”,“payload”:“187”,“topic”:"",“data”:{“entity_id”:“sensor.wd70kwf_range_electric”,“state”:“187”,“attributes”:{“car”:“WD70KWF”,“vin”:“W1K2938902F022320”,“original_value”:“301”,“distance_unit”:“MILES”,“retrievalstatus”:“VALID”,“timestamp”:“2021-02-10T14:30:11”,“unit”:“MILES”,“precondActive”:false,“maxrange”:“197.6”,“distanceElectricalStart”:“2.2”,“chargingstatus”:“3”,“electricconsumptionreset”:“1.3”,“selectedChargeProgram”:“0”,“distanceElectricalReset”:“28.4”,“soc”:“95”,“chargingactive”:false,“electricconsumptionstart”:“0.6”,“unit_of_measurement”:“km”,“friendly_name”:“WD70KWF Range Electric”,“icon”:“mdi:ev-station”},“last_changed”:“2021-02-10T14:30:13.780541+00:00”,“last_updated”:“2021-02-10T14:30:13.780541+00:00”,“context”:{“id”:“7ebd67f348be674bed730dbc8cacc60d”,“parent_id”:null,“user_id”:null},“timeSinceChangedMs”:24062,“original_state”:“187”}}
I think you need to use the attribute “original_value” since 301 / 0.621371 = 187. I had the same problem with the odometer reading as I’m also in the UK so made my sensor like this:
sensors:
odometer_miles:
friendly_name: Odometer in Miles
value_template: '{{ ((states.sensor.car_odometer.attributes.original_value | float * 0.621371)) | round(0) }}'
Ian beat me to it.
I think this is your best option.
Thanks. This is a better solution than mine! I hadn’t played with templates yet but I use node red for lots of things. Went for my comfort zone!
Thanks again.
Your welcome. This is a great component but I’m spending far too much time playing with it
I found an interesting way Mercedes handles Mercedes Me accounts (if one has changed their user e-mail address affiliated with the account).
I had a car under my company account and couple of months ago moved the Mercedes Me account to my personal account (ie. essentially changed the master user e-mail address). My iOS app showed that the account was indeed under the personal e-mail account.
Signing in to the component with my personal e-mail address, it did not show any cars. When I signed in with my company e-mail address (one that was not affiliated with my acct according to the iOS app + online service), I was greeted with my car. It seems that Mercedes does not migrate the attachment from the original e-mail address. Just a heads up if someone encounters the same issue as I was not able to find this in the forum.
Thanks Rene for your work, much appreciated.
Great component! Works perfekt with my E220d 4-matic in Sweden.
I’m kind of new to all this with HA.
I’ve managed create an automation that turns on the auxheater.
So right now I have 5 automations that turns on the auxheater depending on the outdoor temperature.
But Mercedes have some automation in the car, that turns on the auxheater at the right time when I set a departure time.
Is it possible from HA to set the auxheater timer?
Every monday, wenesday and friday I leave home att 07:30 and tuseday and thursday I leave at 07:00
In my car I have Auxheater timer 1 set at 07:30 and auzheater timer set at 07:00, and that works perfect. At least if I remember to activate the timer.
This morning it was -21 degreas C, and last night I forgot…
So preferbly I would like to check at about 06:00 if the temperature is below 0, the activate the the timer for the coresponding day.
I know I can see the the attributes for what timer that is set, and I can see the attribute for what time each timer i set to.
Is it possible to sent updates to these attributes to my car?
Greatful for any answer or direction wher I can learn more…
///Peter!
Hi @pethson,
not sure if I understand the problem in total. Here is an example to start the heating on Mo, Tu, Th, FR at 7am if the outside temp is below 10.
alias: 'Start Auxheat (mo, tu, th, fr) outside below 10'
description: ''
trigger:
- platform: time
at: '07:00'
condition:
- condition: time
weekday:
- mon
- tue
- thu
- fri
- condition: numeric_state
entity_id: sensor.dark_sky_temperature
below: '10'
action:
- service: mbapi2020.auxheat_start
data:
vin: Wxxxxxxxxxxxxxx
mode: single
BR
Rene
HI all, I have been able to successfully add my car to HA - thanks to the excellent work you have done.
I only have one newby question about the sensor.PLATE-NUMBER_car apparently not documented and with a lot of variable values in the day/night, even with the car parked and locked (example below - numbers from 1 to 10...)
thanks
Rob
![image|534x176](upload://a1LhZswUjV2j2qw9LrSIuHU0iKy.png)
Hi @rcampice,
this the sensor shows the received messages from the server. This is not optimal - I know but I had no better idea what I could take as the primary sensor value. Let me know if you have ideas.
For this sensor the attributes are more important…
BR
Rene
Thank you @ReneNulschDE for your answer.
Thats about what I figured out my self.
But thiis starts the auxheater at 07:00 which is OK when I leave at 07:30
My question was more if it was possible to activate the preset timer for the auxheater.
I already have one set to 07:00 and one to 07:30, and I forget to activate it every now and then.
The workaround is to set up a sensor that checks the outside temeperure and depending set up different automations thats start the auxheater at different times to get the car warm before I leave.
If I could activate the preset timers, they will automaticly start the auxheater in time to get the car warm.
By starting the auxheater manualy I probebly will start the heater to early and by that drain the battery more then necessery.
So my question is more like if you can change the attributes for the auxheater, or is that read only?
///Peter!
I have an GLC, and have the same problem only mbapi2020.preheat_start_departure_time that works.
Found any solution?
is it possible to use input_number or input_datetime in service data field?
Ex;
vin: Wxxxxxxxxxxxxxx
time: ‘input_datetime.departure_time’
Hi @Jurgmaister,
the input for “time” is minutes after midnight. You can calculate this based input date_time. Here an easy example:
Minutes after midnight {{ now().minute + now().hour * 60 }}.
If you use a input_datetime sensor than divide the time by 60 (assuming has_date: false
)
{{ (state_attr('input_datetime.i_datetime', 'timestamp') / 60) | round }}
See here on how to use templates in the service-call dialog
Hope this helps, if not try to reformulate your question.
Hi @pethson,
I can implement this configuration service, but i have not seen a reason yet. I assumed that everyone would use a temperature sensor to decide if I would like to start the AUX_HEAT (based on my travel calendar of course).
Let me check over the weekend, if I can implement the configuration service. I have no access to a car with AUX_HEAT, thatswhy its not so easy.
BR
Rene
Perfect! Thanks so much