Mercedes Me Component

Put this into a test view and it will list every available attribute. I’m using a wildcard following the first 4 digits of my entity id. In my case la22*.

entities:
  - filter:
      include:
        - sensor.la22*.*
        - binary_sensor.la22*.*
        - device_tracker.*la22*.*
    heading_name: 'Car details'
    heading_state: '   '
    title: null
    type: 'custom:entity-attributes-card'
type: entities

1 Like

From what I see in my json the liquid_range_critical and engineHoodClosed are now liquidRangeCritical and engineHoodStatus respectively. I suspect only minor changes are need to bring in these attributes.

I’m not seeing the tireWarningRollup. Wouldnt this be the same as the binary_sensor.la221804_tire_warning? It contains 6 tire attributes, although I think there should be 8.

missing

tireMarkerFrontRight:
tireMarkerRearRight:

image

Reserve Tank, if you mean critical tank level it’s binary_sensor.(licenseplate)_liquid_range_critical yes.
Tire Warning is already included as: binary_sensor.(licenseplate)_tire_warning
Engine Hood Status I could find in the data, but not available in mbapi2020 yet.

@ReneNulschDE
I can see auxheat is already included in some way, but not displayed yet as entity. Anything I can provide to further analyze and include it?

Here my list of additional interesting available items in json file (from my 11/2020 E class MOPF):

          "engineHoodStatus": {
            "timestamp": "1605879257",
            "bool_value": false,
            "timestamp_in_ms": "1605879257000",
            "service_ids": [
              669
            ]
          },

          "warningwashwater": {
            "timestamp": "1610800518",
            "bool_value": false,
            "timestamp_in_ms": "1610800518000",
            "service_ids": [
              505
            ]
          },

          "tankCapOpenLamp": {
            "timestamp": "1605859487",
            "bool_value": false,
            "timestamp_in_ms": "1605859487000",
            "service_ids": [
              505
            ]
          }

          "ignitionstate": {
            "timestamp": "1610800523",
            "int_value": "0",
            "timestamp_in_ms": "1610800523000",
            "service_ids": [
              669
            ]
          },

          "oilLevel": {
            "timestamp": "1606148331",
            "int_value": "100",
            "timestamp_in_ms": "1606148331000",
            "service_ids": [
              505
            ]
          },

In reality I counted over 140 available attributes. The question becomes what’s truly important. It’s not as easy as just including the code. Every sensor needs the value type defined. Binary sensors are easier. I assume Rene has some online resource for determining the value definitions.

Sounds good. I know in the app you can select the individual units of measure. I suspect MB does the conversion for us based on these settings and creates the “display_value”.

Copied from the profile settings

Speed and distance
mph, mi

Consumption (Fuel)
mpg (US)

Tire Pressure
psi

Temperature
Fahrenheit

Time
12h (AM/PM)

Great component. Thanks for the development of this.

Just been testing the services via the development tools and mbapi2020.preheat_start does not work on my plug-in-hybrid. Same for mbapi2020.preheat_start_departure_time.

mbapi2020.doors_lock etc works great, so I know HA setup is working

Do you know if the service mbapi2020.preheat_start more specific for pure EV?

hmm; i dont see binary_sensor.VIN_tire_warning
yet in the Mer Me app, i can see tire status in there

ignitionstate would be great so we can see if the car is running or not

took the car out today and i noticed that the braking brake sensor did not change from on to off the entire time of (20 mins)

binary_sensor.VIN_park_brake_status

I think what we want is called engineState as it is a boolean.

  • false : Engine is not running
  • true : Engine is running

The ignitionstate is carrying an int_value which I suspect needs to be defined as follows.

  • 0 : “ignition lock”
  • 1 : “ignition off”
  • 2 : “ignition accessory”
  • 4 : “ignition on”
  • 5 : “ignition start”

I created a PR to Rene adding the engineState and the remoteStartActive binary sensors.

3 Likes

So I spent all day today trying to get this to work and finally everything is working as expected. I have to say, great job on the this and really appreciate all the hard work you have done. I live in the US so if you would like someone to validate anything let me know. So far it’s been working flawlessly. Some of the services I’ve tried are lock and unlock. I do have a question. I’m wondering if anyone has a good way of automating the lock action so that I can just walk away from the car. The way I have it setup right now is it detects the phone mercedes me app notification and triggers a lock door action. This takes a few minutes though and I’d like something more immediate. I was thinking something along the lines of the car was connected to bluetooth but no longer is and now my phone shows walking. I’m still trying to figure out the best way. If anyone has thoughts it’d be appreciated. I know it sounds lazy but my previous 2 cars automatically locked when I walked away from the car so after 12 years it’s hard to break old habits and I’ve already found myself constantly leaving it unlocked.

Has been working fine for me.

I’m not sure if it would help, but you could try adding an availability_template to each sensor to check if binary_sensors.g_646_lz_tire_warning is actually defined.

thanks, not sure how to do that, but after a restart of HA and host it dissapeared. I will keep an eye on it and will have a look if it returns.

I think you can add this to each sensor:

availability_template: '{{ states("binary_sensors.g_646_lz_tire_warning") != "unknown" }}'
1 Like

For some reason I dont see the liquidconsumptionstart, only liquidconsumptionreset.
But if I turn on debug I can see that both appear in the json file.
C220d 2019

I have also some values for electrical cars in my json, but I think if it includes „ “nil_value”: true,“ then it is not really available

This is really great work and I love the card. All seems to work with the exception of the tire warning attribute… so here is my entity, just like expected:

but this part of the code is not accepted (rest work, with the exception of the 4 tire pressure attributes) and gives a validation error. it is not an indenting issue. I have edited my numberplate in the below example, but the last 3 are correct. I feel it is an issue with the number-character combination… :

      car_tire_pressure_rear_left:
        friendly_name: Tire pressure Rear Left
        value_template: '{{ states.binary_sensor.0000jsx_tire_warning.attributes.tirepressureRearLeft }}'

the config validation error:

Invalid config for [sensor.template]: invalid template (TemplateSyntaxError: expected token 'end of print statement', got 'jsx_tire_warning') for dictionary value @ data['sensors']['car_tire_pressure_rear_left']['value_template']. Got '{{ states.binary_sensor.0000jsx_tire_warning.attributes.tirepressureRearLeft }}'. (See ?, line ?).

Anyone has a clue how to correct this?
thanks!

Your template seems okay to me (you can validate templates in the HA developer tools, there’s a template test area there).

Just in case, try this instead:

value_template: '{{ state_attr("binary_sensor.0000jsx_tire_warning", "tirepressureRearLeft") }}'
1 Like

Thanks Robert! your suggestion did the trick!! must have been something in the name that confused it and your alternative works smooth!

Just wanted to post that if you have a garmin watch you can use HassIQ in the app store to integrate with Home Assistant. I use it to trigger scripts I built to start/stop the car, lock/unlock the car. It’s really handy and makes managing the car super easy. I’m sure other smartwatches have HA integrations as well you can use to control your car.

1 Like