Mercedes Me Component

Hi @VietNgoc , great work from your side! One hint: The service preheat should have the name pre-climate or pre-conditioning… (it was winter when I implemented it and it was not clear for me that it could cool down the car too…)

Thanks to you, during the development of the card I learned a lot of things from component code, until then I knew very little how to create such integration. :100: I will rename the service if there is an update in the future. :sweat_smile:

hello, in my mercedes me component, the service MercedesME 2020: Battery max soc configure do nothing… ¿somebody test and work success on a GLC hybrid?
In registry show:
Can’t configure battery_max_soc for car W1NKMXXXXXXXX. Feature not availabe for this car.

The GLC Hybrid does not support the setting of max_soc. It is available for EQx only.

ok, thanks…

@VietNgoc How can I force dark mode for the full card?

Hi, the card is now set to darkmode according to the HA theme settings… I don’t know what you mean by setting darkmode for the whole card. Do you want to have the card dark, now as it is for the light mode of the system, or the whole customization including the buttons by yourself?

I use a custom theme called Noctis. This is a very dark team. I have no way (=have not found a way) to force this theme into thinking it’s a dark theme. So your card thinks a light theme is active and behaves like the light version. So I was wondering if there is a way in the card config to ‘force’ it into a dark mode behavior.

I have prepared support for custom theme, everyone can set their own theme for card, independent of the system. But there is a small problem. Since the current map for the tracker uses the leaflet library, there is a small selection for the light/dark theme. So there is an ugly transition between card background and map.

Summary

https://a.dropoverapp.com/cloud/download/51e30eef-7db1-42b5-9f14-cfe325718cec/352260b9-16cc-4699-a094-4ffdb997e0c0

https://a.dropoverapp.com/cloud/download/39406d29-14bd-4f13-8c4e-7cf505307a2c/28254568-c59f-4001-becb-69809b826a2a

PS: You can directly set the dark mode for a specific Noctis theme. :grimacing:

Noctis theme

noctis:
  modes:
    dark:
      # Fonts
      primary-font-family: 'Raleway,sans-serif'
      paper-font-common-base_-_font-family: 'var(--primary-font-family)'
      paper-font-common-code_-_font-family: 'var(--primary-font-family)'
      paper-font-body1_-_font-family: 'var(--primary-font-family)'
      paper-font-subhead_-_font-family: 'var(--primary-font-family)'
      paper-font-headline_-_font-family: 'var(--primary-font-family)'
      paper-font-caption_-_font-family: 'var(--primary-font-family)'
      paper-font-title_-_font-family: 'var(--primary-font-family)'
      ha-card-header-font-family: 'var(--primary-font-family)'

      # Text
      text-color: '#ffffff'
      primary-text-color: 'var(--text-color)'
      text-primary-color: 'var(--text-color)'
      secondary-text-color: '#BAC0C6'
      text-medium-light-color: '#A0A2A8'
      text-medium-color: '#80828A'
      disabled-text-color: '#626569'
      primary-color: 'var(--accent-color)'
      text-light-primary-color: 'var(--text-color)'
1 Like

Well found! Thanks, works. Still like you option / potential support for custom theme even more

The problem of map blending with the background of the card is solved, the card looks much better with different variants of Themes… i will test with others and release a new version with this feat. :grinning: :grinning:

Preview of the theme selection here

new version released :love_you_gesture:

4 Likes

Hi @ReneNulschDE, it seems that the integration ‘loses’ my credentials now even when not rebooting, seems to be driven from a loss of connection somehow?
Any idea how I might prevent this, or is this an issue that requires addressing?

Summary

This error originated from a custom integration.

Logger: custom_components.mbapi2020.coordinator
Source: helpers/update_coordinator.py:312
integration: MercedesME 2020 (documentation, issues)
First occurred: 11:48:23 (10 occurrences)
Last logged: 13:13:47

Unexpected error fetching mbapi2020 data
Traceback (most recent call last):
File “/usr/local/lib/python3.12/site-packages/aiohttp/connector.py”, line 1025, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 1122, in create_connection
raise exceptions[0]
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 1104, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 1007, in _connect_sock
await self.sock_connect(sock, address)
File “/usr/local/lib/python3.12/asyncio/selector_events.py”, line 641, in sock_connect
return await fut
^^^^^^^^^
File “/usr/local/lib/python3.12/asyncio/selector_events.py”, line 681, in _sock_connect_cb
raise OSError(err, f’Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed (‘18.192.155.242’, 443)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/config/custom_components/mbapi2020/coordinator.py”, line 50, in _async_update_data
await self.client.update_poll_states(vin)
File “/config/custom_components/mbapi2020/client.py”, line 1279, in update_poll_states
geofencing_violotions = await self.webapi.get_car_geofencing_violations(car.finorvin)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/mbapi2020/webapi.py”, line 190, in get_car_geofencing_violations
return await self._request(“get”, url, rcp_headers=False, ignore_errors=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/mbapi2020/webapi.py”, line 68, in _request
token = await self._oauth.async_get_cached_token()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/mbapi2020/oauth.py”, line 167, in async_get_cached_token
token_info = await self.async_refresh_access_token(token_info[“refresh_token”], is_retry=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/mbapi2020/oauth.py”, line 102, in async_refresh_access_token
token_info = await self._async_request(method=“post”, url=url, data=data, headers=headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/mbapi2020/oauth.py”, line 245, in _async_request
async with self._session.request(method, url, data=data, **kwargs) as resp:
File “/usr/local/lib/python3.12/site-packages/aiohttp/client.py”, line 1197, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/aiohttp/client.py”, line 581, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/aiohttp/connector.py”, line 544, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/aiohttp/connector.py”, line 944, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/aiohttp/connector.py”, line 1257, in _create_direct_connection
raise last_exc
File “/usr/local/lib/python3.12/site-packages/aiohttp/connector.py”, line 1226, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/aiohttp/connector.py”, line 1033, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host id.mercedes-benz.com:443 ssl:default [Connect call failed (‘18.192.155.242’, 443)]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py”, line 312, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/mbapi2020/coordinator.py”, line 52, in _async_update_data
raise MbapiError from err
custom_components.mbapi2020.errors.MbapiError

Looks like your DNS cache is not up-to-date. You’re log shows that id.mercedes-benz.com gets resolved to 18.192.155.242. But this IP is not delivered by the global DNS.

Current global DNS answers:

Name:	id.mercedes-benz.com
Address: 18.153.226.196
Address: 18.192.60.10
Address: 3.127.196.93

Please check your DNS setup.

I guess the cache got updated, as it came back all by itself… Sorry for the confusion!

1 Like

Polish translation is now 100% complete :slight_smile:

1 Like

Hi everyone,

I’ve just released a new version of the card with an added feature to display the selected language. The default language is still English, but we’ve added a few more languages generated via a translator, so some names might not be fully accurate. :laughing:

If you’d like to help improve the translations or add more, I’d love to see your PRs. :pray:You can try the new version here or download it again via HACS and select the beta/pre-release version. :point_down:

Thanks!

1 Like

image

Am I correct in thinking that the red exclamation marks indicates that there is something wrong within the vehicle status tab?? All of my entries are “OK” and all doors and windows etc are locked/closed and as far as I can tell the “status” is fine.

Any thoughts would be appreciated.
Thanks

Yes, warning notify is displayed when some warning entities are in the On state. these are usually binary_sensor from the component. Try to reload the whole integration, maybe some sensor is not updated. So far I haven’t noticed this issue… let me know if after reload notify is still there.

CleanShot 2024-08-02 at 11.03.17

Thanks for the reply. I have reloaded and restarted HA a number of times. The issue has been present for a while and have used the car numerous times so hopefully data has been updated.
Here’s my current status.

your sensor engine light is missing state, you can compare if there are any warnings directly in the ME app, if some of the data are different :zipper_mouth_face: :no_mouth: