Mercedes Me Component

Hi @ReneNulschDE, thanks for the reply. Unfortunately (or fortunately), I cannot reproduce the problem now. I only tried one night, and there it was a reproducible problem. Maybe there was simply a problem with the mercedes service that night. Also, since then, I have upgraded HA core, but I doubt that this has something to do with it.

Anyway, it works now, sorry for bothering.

Nice integration. Manage to get it running within 10 mins. Thank you so much. Another reasons from me to move from openhab to hass.

For those looking for more accurate images of your car to use for cards you can use the following api from mercedes. The api has max limit of 5 attempts for free. When you call the first api to get image ids, Save the ids. The second api to get images doesnt have limit.

1 Like

I have published a new release v0.5.7

This version adds a service to transfer a route to a car.

Usage example - A button that submits the location of the “Brandenburger Tor” in Berlin to the car.

type: button
tap_action:
  action: call-service
  service: mbapi2020.send_route
  service_data:
    vin: WXXXXXXXXXXXX
    title: Brandenburger Tor
    latitude: '52.5162746'
    longitude: '13.3755154'
    city: Berlin
    postcode: '10117'
    street: Pariser Platz 1
  target: {}
name: Send "Brandenburger Tor"-Route to Car

After few seconds the route is shown on the car display:

3 Likes

so cool Rene! Actual message shows up as notification. Maybe it is possible to “template” messages to it :grimacing:

1 Like

Hi @ReneNulschDE

did i fill the options right?

My car is unavailable after filling the options.

Why do you exclude the VIN?

I suppose i read like include :flushed:
After removing the VIN, will my car come back alive in HA?

Yes, just restart HA.

1 Like

Just for the documentation: the exclude VIN option is used in the US-region. Some users get multiple VINs for one car and with this option they can hide the cars without data.

1 Like

Thank you for clearing that out…

I have published a new version 0.5.8.

Add:
Sensor: State of charge

State of charge (SoC) is the level of charge of an electric battery relative to its capacity. The units of SoC are percentage points (0% = empty; 100% = full).

@svh1985 : hope this makes things easier.

2 Likes

Nice that’s perfect, thanks!

´´´
Hey guys, tried to integrate the MME 2020 component via HACS. No problems, but integration is not shown up. All folders are in Custom components, Logs show:
2021-08-07 09:45:45 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration mbapi2020 which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
So as far as I see no problems but no Entities, Devices or Mercedes Me 2020 components. restart of HA 2 times on RPi 4
THX for ideas Peter

Hi Peter,

Did you added the component via the integrations page after installation with HACS?

Was to login procedure successful?

Br
Rene

Hey Rene,
I integrated the component via HACS. But after restarting nothing happened.

  1. HACS in Sidebar
  2. Searching the Integration MM 2020 via HACS
  3. Installing via HACS (reply: Integration is waiting for restart of system)
  4. Restart of HA, nothing is shown up
    KR Peter

Hi,

After the installation via HACS, please go to the integration page (Configuration, Integrations) in HA and click on the plus sign (Add Integration). Search for the MB component and follow the config wizard.

HACS is just the helper to install the component. All the other magic like initial Setup is done in Home Assistant.

1 Like

Thx for the hint. It was different to the other hacs integrations. They were shown up after restart and I didn’t have to integrate via ‘normal’ integration. Learned again. I wish you a Nice weekend.
Kind regards
Peter

How can i change the text color for “open” and “closed”
i.e “open” would be red and “closed” would be green

sensor:
  - platform: template
    sensors:
       sensor_car_lock:      
        friendly_name: Car Lock
        value_template: >-
            {% if is_state('sensor.car_lock', '2')%}
                Locked
            {% else %}
                Open
            {% endif %}

Hi Chris,

There are a few ways you can do it, all of which are in lovelace. I like the custom:button-card which allows js. Button-card can be used on its own or in a grid or picture-elements card, which is handy.

From my earlier post I’m still stuck with this,
i have custom-cards installed and working fine.
I am trying to implement this.

here is my code below:

type: custom:button-card
color_type: card
entity: lock.car_lock
name: Car Lock
show_state: true
state:
  - value: Unlocked
    color: red
    icon: mdi:car-door
    styles:
      card: null
  - animation: blink 2s ease infinite
  - operator: default
    color: green
    icon: mdi:shield-check

This does bring up the menu to lock/unlock the car which is working fine, its the card which isn’t changing from green to red depending on weather it is locked/unlocked.
Any help would be much appreciated.