Mercedes Me Component

Are you using the HomeKit native integration? During the configuration you include the desired domains and exclude any unwanted entities. Be certain you didn’t exclude it by mistake.

Hei why is my charge Power negative after charging stopped?

The sensor is sensor.vin_charging_power … thanks !

Another question is: The Chargingstatus is shown as numeric, same es e.g. windows.

How can I translate that attriute of the sensor rangeElectric to string values? Tried a template sensor but it seems I am too stupid for that …

1 Like

Hi,

I have published a maintenance release v0.6.8 to keep up with the HA changes.

Requires HA 2022.11

Fixes:
Detected integration that accesses the is_metric property of the unit system. This is deprecated and will stop working in Home Assistant 2023.1. Please adjust to use instance check instead… Please report issue to the custom integration author for mbapi2020 using this method at custom_components/mbapi2020/init .py, line 529: not self._hass.config.units.is_metric:

Thx to ?Tom? for the reminder to publish the code…

BR
Rene

1 Like

Hi @Sweti3 ,

You can find the text values here.

Here a “template”-value statement as a starting point:

{% if state_attr("sensor.XXX_range_electric", "chargingstatus") == "0" %}
  charging
{% elif state_attr("sensor.XXX_range_electric", "chargingstatus") == "1" %}
  end of charge
{% elif state_attr("sensor.XXX_range_electric", "chargingstatus") == "2" %}
  charge break
{% elif state_attr("sensor.XXX_range_electric", "chargingstatus") == "3" %}
  charge cable unplugged
{% endif %}


needs some extensions to the other possible values and you have to replace XXX with your sensor name. This should give you a starting point.

BR
Rene

Hi @Sweti3 ,

never have seen this before. What car do you have? Do you use an US or EU car? Ok, looks like you are in Germany based on the date format… And based on the MaxRange it is an EQ*.

@All : Has anyone seen a negative value before?

BR
Rene

Hi, by mistake i have deleted the AuxHeat Switch Entity. I think it wasn’t available for some time and then i did this mistake. It never came back automatically. Is there any way for me to get it back without deleting the integration?

Awesome! Thank you so much, struggled with the simplest of things, but now it is running AWESOME! Thanks, danke dir!

Hei, it is an EQB, living in Germany, now the vlaue states 0.0 as it is okay. But mysteriously, while i was looking at it yesterday, there was the message that this sensor is not provided by your Integration anymore, I used:

sensor.MYVEHICLEID_charging_power is this the correct value ? Thanks!

Hi there,

Gents, I am looking for your help with this error message.
Error occurred loading configuration flow for integration mbapi2020: cannot import name 'US_CUSTOMARY_SYSTEM' from 'homeassistant.util.unit_system' (/usr/src/homeassistant/homeassistant/util/unit_system.py)
After an update this integration stop communicating with my car. I tried to delete it and add it again but something went wrong. In the log I see the error above but in my unit_system.py there is now US_CUSTOMARY_SYSTEM. I live in Poland nad have been using this integration flawlessly for around a year until recent update. Any hints?

I’m seeing the same on mine after upgrade :confused:

I think that the way how to get a token has changed and we need to follow the instruction here: GitHub - xraver/mercedes_me_api: Script to use Mercedes Me APIs.

The version v0.6.8 requires HA version 2022.11. You can go back to v0.6.7 when you are on older versions.

@rollesky , what do you mean? Can you explain it?

Hi,
I’ve been testing this component since September and I like it.

If I’m not mistaken, sensors and / or attributes are updated about every 15 seconds.

But I have noticed from the 2022.11 update onwards, the sensors are having difficulty updating.

As you can see from the image the door status is wrong it should have been in close status for at least 2 hours.
I wonder if this has also happened to others who do not update.

as you can see from the image the door status is wrong

thanks
immagine

Hi,

the update happens whenever the component receives new status messages from the MB servers. It’s a push component. For me it looks consistent. The lock is open but the doors are closed.

Not sure if I misunderstood it.

BR
Rnee

Thanks for the reply.
yes the doors are closed but the lock state should also be closed, because I have parked it for almost 3 hours, and I am sure that the car is closed.
Maybe I have some problems with the updates from the MB server

1 Like

Thx for clarifying. I checked this with my cars. My GLC does not report the locked status update (change from closed to open) right now, but the GLA shows the status update after 2 seconds. Let me start my GLC and check again (Was not started in the last 5days, and the unlock in the app does not work too, and the starter battery state is 1=yellow <–I assume this is the reason). Could you check your starter battery state?

Update: after starting the engine of the GLC, the lock status is updated again. So no general problem

I am also doing some tests but I see that it is slow in updating, it seems that it has difficulty connecting to servers in my country, because sometimes it does not update and sometimes it responds in the right time.
If I see variations I let you know for information.

Recently updated custom component to v0.6.8 and getting:

2022-11-22 12:20:28.887 WARNING (MainThread) [custom_components.mbapi2020] Can't connect to MB APIs; Retrying in background

Anyone else? Reloading or restarting does not resolve. Mobile app (and so, I guess, Mercedes’ APIs) are working.
Matt