Mercedes Me Component

Hi, I wanted to share with you my dashboard of our family’s cars and help you to get some new ideas to create your own. Thanks so much @ReneNulschDE for this amazing integration and latest beta (0.14.0 beta1) which allows downloading cars images and @Thomas01 who made easy tutorial for picture-elements.

Dashboard layout is in Sections, each car has its own.

First row is just a Mushroom Title (Sections name is too small).

Second row is vertical stack of two conditional entities. There are two PNG photos from Mercedes Me app (just a screenshot) with added Benz and AMG logos. I made two versions, first one is shown when Sun is above horizon, the second one when Sun is under horizon. Conditions may vary according to your taste, there is no limit to your imagination. In future it would be nice to have eg. night versions (with lights on) based on daytime.

Third row are bunch of chips (templates only), which change color according to status (OK/not OK, Service in x days <365 green, <60 yellow, <30 amber, <15 orange, <7 red).

Fourth row are another chips (templates only again), but only fuel changes color. The rest is ignition state and Today’s and Monthly costs in my currency.

Fifth row consists of two mushroom entities in horizontal stack - today’s consumption and today’s km

Sixth row is just a lock.

Last row is picture-elements card.

Unfortunately, none of these cars have a Mercedes subscription, so the location is not available. Also these cars are not the newest (2016-2018), so there are no commands like opening/closing windows or sunroof, much less starting the engine (EU law), otherwise the subscription would make bigger sense.

Layout in edit mode (only S 350d is in English):

Layout in view mode (only S 350d is in English):

5 Likes

Nice.

Ha, interesting concept, never though about that. Maybe I can make something similar…

Really, that’s an EU law?

I was always wondering why I can unlock my car remotely, but not start (or set to driving mode for the electric version) my Mercedes remotely. The Tesla I had previously could do that, and I found that really helpful as a backup on misplacing/forgetting the car key, or let someone else relocate the car while I’m away.

Another engineer?

Also for the service interval: That’s my take, setting up a custom sensor and either calculating the date or the km when the next service is due. You can set the timestamp_custom to your own liking.

    eqs_service:
      friendly_name: "Next Service"
      icon_template: mdi:car-brake-alert
      value_template: >
        {% if state_attr('sensor.XXX_odometer', 'serviceintervaldays') != none %}
          {{ as_timestamp(now() + timedelta( days = state_attr('sensor.XXX_odometer', 'serviceintervaldays')|int(0) )) | timestamp_custom('%d-%m-%Y') }}
        {% else %}
          {{ states('sensor.XXX_odometer')|int(0) + state_attr('sensor.XXX_odometer', 'serviceintervaldistance')|int(0) }} km
        {% endif %}

Hi,

I’m trying to download images of my car, but I get this error:
“Given VIN/FIN is not managed by any coordinator or excluded in the integration options.”

I’ve erroneously set my VIN to be excluded, but now I’ve deleted it.
I’ve also tried with another VIN (not connected to my account), but I get the same results.

Any ideas?

I think you need to have the VIN in your Mercedes Me account, and used in the integration.
So set up your car to use in the Mercedes integration, then use the services with the same car.

I’ve reinstalled the integration and now it works…

Could you share the card code?

Thank you, I am looking forward to your ideas.

Unfortunately yes, I don’t know any European country which oficially allows remote engine start. But if you take a look at some US Youtubers, it is pretty common feature in this region (maybe Asia as well, but I’m not sure). I think it could be “problem” with emissions, thefts or noise (we know how EU is sensitive about them). I have some friends who have US import cars and do have this feature (but they don’t have Mercedes).

Well… I can’t change it to bar (nothing happens when manually change it), so I have to live with that :sweat_smile:

My cars don’t have serviceintervaldistance attribute, so I am happy with just a chip template. But still, why would you create another sensors when these attributes are dynamically changing every day/km? It isn’t fixed date or km.

@michael.kmoch wow! yuur card looks fantastic!
can you share the code of your card?

thanks

You can change it in the MB-App. Should then change immediately in HA too. But keep in mind that your statistics get messed…

Best
Rene

If your car reports days for the next service date, then you have serviceintervaldays in your attribute, but if your car reports km until your service is due, then you have serviceintervaldistance (and serviceintervaldays vanishes).
Thats at least with my car. Every now and then MercedesMe switches from date to km, and later back.
Thats also the reason why I check if serviceintervaldays exists via

{% if state_attr('sensor.XXX_odometer', 'serviceintervaldays') != none %}

In my case, my daily drives is fairly consistent and short drives only, but once in a while I have a way longer dirve, and then MercedesMe switches to a km based service interval (apparently the algorithm adapts), and both the iOS app and the website reports km until service.

I’m playing around with this fantastic integration and cards. I’m now trying to open/close windows. In the Mercedes app, I can only open or close all the windows together.

So I’m trying this, but it’s not working. Any suggestions?

tap_action:
action: call-service
service: mbapi2020.windows_close
data:
vin: W1K3xxxxxxxxxxxx

What is the error message in the log?

* Car action: WINDOWCLOSE failed. error_code: 6901, error_message: None
* Car action: WINDOWCLOSE failed. error_code: RIS_COULD_NOT_SEND_COMMAND, error_message: None
* Car action: WINDOWCLOSE failed. error_code: RIS_EMPTY_VEHICLE_API_QUEUE, error_message: None
* Car action: WINDOWCLOSE failed. error_code: CMD_TIMEOUT, error_message: None

Ok, looks like an communication problem of the MB Servers to your car. Does it work in the mbapp?

Please download the diagnostic log of this component from the integration page and send it to [email protected]

I will take a look when I’m back at home end of next week.

mmm… the car was in the box, probably with connection issue… i’ll do some other tests today!
many thanks!

Yeah, sure. Please keep in mind that friendly names are in my language, so convert them to your language, but entities have original names so you will recognize them easily.

For picture-elements card I suggest use @Thomas01’s tutorial.

type: sections
max_columns: 3
title: Garáž
path: garaz
sections:
  - type: grid
    cards:
      - type: custom:mushroom-title-card
        title: Mercedes S 350d
      - type: vertical-stack
        cards:
          - type: conditional
            conditions:
              - condition: state
                entity: sun.sun
                state: above_horizon
            card:
              type: picture
              image: local/mercedes_s_350d/mercedess350dbenz.png
              card_mod:
                style: |
                  ha-card
                    {background: transparent;
                     border-style: none;
          - type: conditional
            conditions:
              - condition: state
                entity: sun.sun
                state: below_horizon
            card:
              type: picture
              image: local/mercedes_s_350d/mercedess350dbenzback2.png
              theme: Fluent Blue
              card_mod:
                style: |
                  ha-card
                    {background: transparent;
                     border-style: none;
      - type: vertical-stack
        cards:
          - type: custom:mushroom-chips-card
            chips:
              - type: template
                tap_action:
                  action: more-info
                hold_action:
                  action: more-info
                double_tap_action:
                  action: more-info
                entity: binary_sensor.mercedes_s_350d_engine_light_warning
                icon_color: >-
                  {% set kontrolka_motoru =
                  states('binary_sensor.mercedes_s_350d_engine_light_warningngine_light_warning')
                  %}

                  {% if
                  is_state('binary_sensor.mercedes_s_350d_engine_light_warning',
                  'off') %}
                    green
                    {% else %}
                    amber
                  {% endif %}
                icon: mdi:engine
                content: >-
                  {% if
                  is_state('binary_sensor.mercedes_s_350d_engine_light_warning',
                  'off') %}
                                OK
                              {% else %}
                                Problém
                              {% endif %}
              - type: template
                tap_action:
                  action: more-info
                hold_action:
                  action: more-info
                double_tap_action:
                  action: more-info
                entity: binary_sensor.mercedes_s_350d_low_coolant_level_warning
                content: >-
                  {% if
                  is_state('binary_sensor.mercedes_s_350d_low_coolant_level_warning',
                  'off') %}
                                OK
                              {% else %}
                                Problém
                              {% endif %}
                icon_color: >-
                  {% set chladici_kapalina =
                  states('binary_sensor.mercedes_s_350d_low_coolant_level_warning')
                  %}

                  {% if
                  is_state('binary_sensor.mercedes_s_350d_low_coolant_level_warning',
                  'off') %}
                    green
                    {% else %}
                    amber
                  {% endif %}
                icon: mdi:oil-level
              - type: template
                tap_action:
                  action: more-info
                hold_action:
                  action: more-info
                double_tap_action:
                  action: more-info
                icon: >-
                  {% set nadrz_ostrikovace =
                  states('binary_sensor.mercedes_s_350d_low_wash_water_warning')
                  %}

                  {% if
                  is_state('binary_sensor.mercedes_s_350d_low_wash_water_warning',
                  'off') %}
                    mdi:wiper-wash
                    {% else %}
                    mdi:wiper-wash-alert
                  {% endif %}
                icon_color: >-
                  {% set nadrz_ostrikovace =
                  states('binary_sensor.mercedes_s_350d_low_wash_water_warning')
                  %}

                  {% if
                  is_state('binary_sensor.mercedes_s_350d_low_wash_water_warning',
                  'off') %}
                    green
                    {% else %}
                    amber
                  {% endif %}
                content: >-
                  {% if
                  is_state('binary_sensor.mercedes_s_350d_low_wash_water_warning',
                  'off') %}
                                OK
                              {% else %}
                                Doplnit
                              {% endif %}
                entity: binary_sensor.mercedes_s_350d_low_wash_water_warning
              - type: template
                entity: binary_sensor.mercedes_s_350d_low_brake_fluid_warning
                icon: >-
                  {% set brzdova_kapalina =
                  states('binary_sensor.mercedes_s_350d_low_brake_fluid_warning')
                  %}

                  {% if
                  is_state('binary_sensor.mercedes_s_350d_low_brake_fluid_warning',
                  'off') %}
                    mdi:car-brake-fluid-level
                    {% else %}
                    mdi:car-brake-alert
                  {% endif %}
                icon_color: >-
                  {% set brzdova_kapalina =
                  states('binary_sensor.mercedes_s_350d_low_brake_fluid_warning')
                  %}

                  {% if
                  is_state('binary_sensor.mercedes_s_350d_low_brake_fluid_warning',
                  'off') %}
                    green
                    {% else %}
                    red
                  {% endif %}
                content: >-
                  {% set brzdova_kapalina =
                  states('binary_sensor.mercedes_s_350d_low_brake_fluid_warning')
                  %}

                  {% if
                  is_state('binary_sensor.mercedes_s_350d_low_brake_fluid_warning',
                  'off') %}
                    OK
                    {% else %}
                    Doplnit brzdovou kapalinu
                  {% endif %}
                tap_action:
                  action: more-info
              - type: template
                entity: sensor.mercedes_s_350d_odometer
                icon: mdi:car-wrench
                icon_color: >-
                  {% set auto_servis =
                  state_attr('sensor.mercedes_s_350d_odometer','serviceintervaldays')
                  | int %}

                  {% if auto_servis <= 7 %}
                    red
                  {% elif auto_servis <= 15 %}
                    orange
                    {% elif auto_servis <= 30 %}
                    amber
                    {% elif auto_servis <= 60 %}
                    yellow
                    {% elif auto_servis <= 365 %}
                    green
                  {% endif %}
                content: >-
                  Servis za
                  {{state_attr('sensor.mercedes_s_350d_odometer','serviceintervaldays')
                  }} dní
                picture: ""
                tap_action:
                  action: more-info
            alignment: justify
          - type: custom:mushroom-chips-card
            chips:
              - type: template
                icon: mdi:gas-station
                entity: sensor.mercedes_s_350d_fuel_level
                icon_color: >-
                  {% set stav_paliva =
                  states('sensor.mercedes_s_350d_fuel_level') | int %}

                  {% if stav_paliva <= 5 %}
                    red
                  {% elif stav_paliva <= 15 %}
                    orange
                    {% elif stav_paliva <= 40 %}
                    amber
                    {% elif stav_paliva <= 75 %}
                    yellow
                    {% elif stav_paliva <= 100 %}
                    green
                  {% endif %}
                content: "{{states('sensor.mercedes_s_350d_fuel_level')}} %"
                tap_action:
                  action: more-info
                hold_action:
                  action: more-info
                double_tap_action:
                  action: more-info
              - type: entity
                entity: sensor.mercedes_s350d_zapalovani
                use_entity_picture: true
                content_info: state
              - type: template
                content: Dnes {{states('sensor.cena_jizdy') | round(0) }} Kč
                entity: sensor.cena_jizdy
                tap_action:
                  action: more-info
              - type: template
                content: Tento měsíc {{states('sensor.cena_za_mesic') | round (0)}} Kč
                entity: sensor.cena_za_mesic
                tap_action:
                  action: more-info
            alignment: center
      - type: horizontal-stack
        cards:
          - type: tile
            entity: sensor.mercedes_s_350d_liquid_consumption_start
            vertical: false
            hide_state: false
            icon: ""
            name: Spotřeba
          - type: tile
            entity: sensor.najezd_bez_rozdilu
            vertical: false
            hide_state: false
            icon: ""
            name: Dnes
            show_entity_picture: false
      - type: horizontal-stack
        cards:
          - features:
              - type: lock-commands
            type: tile
            entity: lock.mercedes_s_350d_lock
            show_entity_picture: false
            hide_state: false
            vertical: false
      - type: picture-elements
        card_mod:
          style: |
            ha-card
              {background: transparent;
               border-style: none;
        image: local/mercedes_s_350d/222000_car.png
        transform: translate(-50%, -50%)
        elements:
          - type: image
            entity: sensor.mercedes_s_350d_door_frontleft
            state_image:
              Otevřené: local/mercedes_s_350d/222000_door_frontleft_open.png
              Odemčené: local/mercedes_s_350d/222000_door_frontleft_unlock.png
              Zamčené: null
            style:
              top: 0%
              left: 0%
              transform: translate(0, 0)
            tap_action:
              action: none
          - type: image
            entity: sensor.mercedes_s_350d_window_frontleft
            state_image:
              Stažené (dveře zamčené): local/mercedes_s_350d/222000_window_frontleft_opendoorclosed.png
              Stažené (dveře odemčené): local/mercedes_s_350d/222000_window_frontleft_opendooropened.png
              Ventiluje (dveře zamčené): >-
                local/mercedes_s_350d/222000_window_frontleft_ventilatedoorclosed.png
              Ventiluje (dveře odemčené): >-
                local/mercedes_s_350d/222000_window_frontleft_ventilatedooropened.png
              Zavřené: null
              Pohybuje se: null
            style:
              top: 0%
              left: 0%
              transform: translate(0, 0)
            tap_action:
              action: none
          - type: image
            entity: sensor.mercedes_s_350d_door_frontright
            state_image:
              Otevřené: local/mercedes_s_350d/222000_door_frontright_open.png
              Odemčené: local/mercedes_s_350d/222000_door_frontright_unlock.png
              Zamčené: null
            style:
              top: 0%
              left: 0%
              transform: none
          - type: image
            entity: sensor.mercedes_s_350d_window_frontright
            state_image:
              Stažené (dveře zamčené): >-
                local/mercedes_s_350d/222000_window_frontright_opendoorclosed.png
              Stažené (dveře odemčené): >-
                local/mercedes_s_350d/222000_window_frontright_opendooropened.png
              Ventiluje (dveře zamčené): >-
                local/mercedes_s_350d/222000_window_frontright_ventilatedoorclosed.png
              Ventiluje (dveře odemčené): >-
                local/mercedes_s_350d/222000_window_frontright_ventilatedooropened.png
              Zavřené: null
              Pohybuje se: null
            style:
              top: 0%
              left: 0%
              transform: translate(0, 0)
            tap_action:
              action: none
          - type: image
            entity: sensor.mercedes_s_350d_door_rearleft
            state_image:
              Otevřené: local/mercedes_s_350d/222000_door_rearleft_open.png
              Odemčené: local/mercedes_s_350d/222000_door_rearleft_unlock.png
              Zamčené: null
            style:
              top: 0%
              left: 0%
              transform: none
          - type: image
            entity: sensor.mercedes_s_350d_window_rearleft
            state_image:
              Stažené (dveře zamčené): local/mercedes_s_350d/222000_window_rearleft_opendoorclosed.png
              Stažené (dveře odemčené): local/mercedes_s_350d/222000_window_rearleft_opendooropened.png
              Ventiluje (dveře zamčené): >-
                local/mercedes_s_350d/222000_window_rearleft_ventilatedoorclosed.png
              Ventiluje (dveře odemčené): >-
                local/mercedes_s_350d/222000_window_rearleft_ventilatedooropened.png
              Zavřené: null
              Pohybuje se: null
            style:
              top: 0%
              left: 0%
              transform: translate(0, 0)
            tap_action:
              action: none
          - type: image
            entity: sensor.mercedes_s_350d_door_rearright
            state_image:
              Otevřené: local/mercedes_s_350d/222000_door_rearright_open.png
              Odemčené: local/mercedes_s_350d/222000_door_rearright_unlock.png
              Zamčené: null
            style:
              top: 0%
              left: 0%
              transform: none
          - type: image
            entity: sensor.mercedes_s_350d_window_rearright
            state_image:
              Stažené (dveře zamčené): local/mercedes_s_350d/222000_window_rearright_opendoorclosed.png
              Stažené (dveře odemčené): local/mercedes_s_350d/222000_window_rearright_opendooropened.png
              Ventiluje (dveře zamčené): >-
                local/mercedes_s_350d/222000_window_rearright_ventilatedoorclosed.png
              Ventiluje (dveře odemčené): >-
                local/mercedes_s_350d/222000_window_rearright_ventilatedooropened.png
              Zavřené: null
              Pohybuje se: null
            style:
              top: 0%
              left: 0%
              transform: translate(0, 0)
            tap_action:
              action: none
          - type: image
            entity: sensor.mercedes_s_350d_trunk
            state_image:
              Otevřená: local/mercedes_s_350d/222000_trunk_open.png
              Odemčená: local/mercedes_s_350d/222000_trunk_unlock.png
              Zavřená: null
            style:
              top: 0%
              left: 0%
              transform: none
          - type: image
            entity: sensor.mercedes_s_350d_window_frontleft
            title: Front Left
            state_image:
              Stažené (dveře zamčené): local/mercedes_s_350d/window_left_open.png
              Stažené (dveře odemčené): local/mercedes_s_350d/window_left_open.png
              Ventiluje (dveře zamčené): local/mercedes_s_350d/window_left_vent.png
              Ventiluje (dveře odemčené): local/mercedes_s_350d/window_left_vent.png
              Zavřené: local/mercedes_s_350d/window_left_closed.png
              Pohybuje se: local/mercedes_s_350d/window_left_moving.png
            style:
              top: 43%
              left: 23%
              transform: translate(-50%,-50%)
          - type: image
            entity: sensor.mercedes_s_350d_window_frontright
            title: Front Right
            state_image:
              Stažené (dveře zamčené): local/mercedes_s_350d/window_right_open.png
              Stažené (dveře odemčené): local/mercedes_s_350d/window_right_open.png
              Ventiluje (dveře zamčené): local/mercedes_s_350d/window_right_vent.png
              Ventiluje (dveře odemčené): local/mercedes_s_350d/window_right_vent.png
              Zavřené: local/mercedes_s_350d/window_right_closed.png
              Pohybuje se: local/mercedes_s_350d/window_right_moving.png
            style:
              top: 43%
              left: 77%
              transform: translate(-50%,-50%)
          - type: image
            entity: sensor.mercedes_s_350d_window_rearleft
            title: Rear Left
            state_image:
              Stažené (dveře zamčené): local/mercedes_s_350d/window_left_open.png
              Stažené (dveře odemčené): local/mercedes_s_350d/window_left_open.png
              Ventiluje (dveře zamčené): local/mercedes_s_350d/window_left_vent.png
              Ventiluje (dveře odemčené): local/mercedes_s_350d/window_left_vent.png
              Zavřené: local/mercedes_s_350d/window_left_closed.png
              Pohybuje se: local/mercedes_s_350d/window_left_moving.png
            style:
              top: 61%
              left: 23%
              transform: translate(-50%,-50%)
          - type: image
            entity: sensor.mercedes_s_350d_window_rearright
            title: Rear Right
            state_image:
              Stažené (dveře zamčené): local/mercedes_s_350d/window_right_open.png
              Stažené (dveře odemčené): local/mercedes_s_350d/window_right_open.png
              Ventiluje (dveře zamčené): local/mercedes_s_350d/window_right_vent.png
              Ventiluje (dveře odemčené): local/mercedes_s_350d/window_right_vent.png
              Zavřené: local/mercedes_s_350d/window_right_closed.png
              Pohybuje se: local/mercedes_s_350d/window_right_moving.png
            style:
              top: 61%
              left: 77%
              transform: translate(-50%,-50%)
          - type: state-label
            entity: sensor.mercedes_s_350d_tire_pressure_front_left
            title: Front Left
            style:
              top: 23%
              left: 33%
              transform: translate(-100%,-50%)
          - type: image
            entity: sensor.mercedes_s_350d_tire_image_frontleft
            state_image:
              Varování: local/mercedes_s_350d/222000_tire_frontleft.png
              OK: null
            title: null
            style:
              top: 0%
              left: 0%
              transform: translate(0, 0)
            tap_action:
              action: none
          - type: state-label
            entity: sensor.mercedes_s_350d_tire_pressure_front_right
            title: Front Right
            style:
              top: 23%
              left: 66.5%
              transform: translate(0%,-50%)
          - type: image
            entity: sensor.mercedes_s_350d_tire_image_frontright
            state_image:
              Varování: local/mercedes_s_350d/222000_tire_frontright.png
              OK: null
            title: null
            style:
              top: 0%
              left: 0%
              transform: translate(0, 0)
            tap_action:
              action: none
          - type: state-label
            entity: sensor.mercedes_s_350d_tire_pressure_rear_left
            title: Rear Left
            style:
              top: 74%
              left: 33%
              transform: translate(-100%,-50%)
          - type: image
            entity: sensor.mercedes_s_350d_tire_image_rearleft
            state_image:
              Varování: local/mercedes_s_350d/222000_tire_rearleft.png
              OK: null
            title: null
            style:
              top: 0%
              left: 0%
              transform: translate(0, 0)
            tap_action:
              action: none
          - type: state-label
            entity: sensor.mercedes_s_350d_tire_pressure_rear_right
            title: Rear Right
            style:
              top: 74%
              left: 66.5%
              transform: translate(0%,-50%)
          - type: image
            entity: sensor.mercedes_s_350d_tire_image_rearright
            state_image:
              Varování: local/mercedes_s_350d/222000_tire_rearright.png
              OK: null
            title: null
            style:
              top: 0%
              left: 0%
              transform: translate(0, 0)
            tap_action:
              action: none
            card_mod:
              style: |
                ha-card
                  {background: transparent;
                   border-style: none;

Thanks for the answer. I think I am ok with kPa :sweat_smile:

Oh, that’s a good point, thanks for knowledge extension :grin:

My drives are also consistent and short only, so I probably just didn’t noticed the change. It isn’t so important attribute, isnt’t it :sweat_smile:

here is my tablet card for my A class.
thanks for all your ideas and help!!

1 Like

Nice.
Just out of curiosity: What kind of controls do you get from the A class? Apparently lock/unlock doors, open/close windows. Anything else? What model year? Do you have to pay MercedesMe subscriptions to use these?

Also: Where did you get the image of the A class on the left? Looks really clean, with no shadow below. I’m looking for something like that for my battery charge status for my EQS:
grafik
As you can see, the shadow below the car kind of spoils it a bit.