Mercedes Me component - flip/invert binary_sensors

Hey guys,

The component is working quite well except for one little annoying thing.
The binary_sensors for the doors & windows seem to be inverted when using in HA as a door/window type.
Also in Homekit the doors show as open when they are closed.

I tried adding my own binary_sensor to invert the state but this is not updated when the state changes, only on restart of HA.
Config:

  • platform: template
    sensors:
    mercedes_locked:
    entity_id: sensor.mercedes_opslot
    friendly_name: “Auto op slot”
    value_template: “{% if is_state(‘binary_sensor.doors_locked’, ‘off’) %}true{% else %}false{% endif %}”

Hope anyone has a way of fixing this.

Try:

platform: template
sensors:
mercedes_locked:
entity_id: sensor.mercedes_opslot
friendly_name: "Auto op slot"
value_template: “{% if is_state(‘binary_sensor.doors_locked’, ‘off’) %}true{% else %}false{% endif %}”
entity_id:
  - binary_sensor.doors_locked
1 Like

Thanks will try that tonight!