Here you go michel!
My sensors are all defined separately:
- platform: template
sensors:
car_tire_pressure_rear_left:
friendly_name: Tire pressure Rear Left
entity_id:
- binary_sensor.wdd2462081n170679_tire_warning
value_template: '{{ states.binary_sensor.wdd2462081n170679_tire_warning.attributes.tirepressureRearLeft }}'
car_tire_pressure_rear_right:
friendly_name: Tire pressure Rear Right
entity_id:
- binary_sensor.wdd2462081n170679_tire_warning
value_template: '{{ states.binary_sensor.wdd2462081n170679_tire_warning.attributes.tirepressureRearRight }}'
car_tire_pressure_front_left:
friendly_name: Tire pressure Front Left
entity_id:
- binary_sensor.wdd2462081n170679_tire_warning
value_template: '{{ states.binary_sensor.wdd2462081n170679_tire_warning.attributes.tirepressureFrontLeft }}'
car_tire_pressure_front_right:
friendly_name: Tire pressure Front Right
entity_id:
- binary_sensor.wdd2462081n170679_tire_warning
value_template: '{{ states.binary_sensor.wdd2462081n170679_tire_warning.attributes.tirepressureFrontRight }}'
car_lock_front_right:
friendly_name: Lock Front Right
entity_id:
- sensor.wdd2462081n170679_lock
value_template: >-
{% if is_state_attr('sensor.wdd2462081n170679_lock', 'doorStateFrontRight', 'DOOR_CLOSED_AND_DOOR_LOCKED')%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('sensor.wdd2462081n170679_lock', 'doorStateFrontRight', 'DOOR_CLOSED_AND_DOOR_LOCKED')%}
mdi:lock-outline
{% else %}
mdi:lock-open-variant-outline
{% endif %}
car_lock_front_left:
friendly_name: Lock Front Left
entity_id:
- sensor.wdd2462081n170679_lock
value_template: >-
{% if is_state_attr('sensor.wdd2462081n170679_lock', 'doorStateFrontLeft', 'DOOR_CLOSED_AND_DOOR_LOCKED')%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('sensor.wdd2462081n170679_lock', 'doorStateFrontLeft', 'DOOR_CLOSED_AND_DOOR_LOCKED')%}
mdi:lock-outline
{% else %}
mdi:lock-open-variant-outline
{% endif %}
car_lock_rear_right:
friendly_name: Lock Rear Right
entity_id:
- sensor.wdd2462081n170679_lock
value_template: >-
{% if is_state_attr('sensor.wdd2462081n170679_lock', 'doorStateRearRight', 'DOOR_CLOSED_AND_DOOR_LOCKED')%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('sensor.wdd2462081n170679_lock', 'doorStateRearRight', 'DOOR_CLOSED_AND_DOOR_LOCKED')%}
mdi:lock-outline
{% else %}
mdi:lock-open-variant-outline
{% endif %}
car_lock_rear_left:
friendly_name: Lock Rear Left
entity_id:
- sensor.wdd2462081n170679_lock
value_template: >-
{% if is_state_attr('sensor.wdd2462081n170679_lock', 'doorStateRearLeft', 'DOOR_CLOSED_AND_DOOR_LOCKED')%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('sensor.wdd2462081n170679_lock', 'doorStateRearLeft', 'DOOR_CLOSED_AND_DOOR_LOCKED')%}
mdi:lock-outline
{% else %}
mdi:lock-open-variant-outline
{% endif %}
car_lock_trunk:
friendly_name: Lock trunk
entity_id:
- sensor.wdd2462081n170679_lock
value_template: >-
{% if is_state_attr('sensor.wdd2462081n170679_lock', 'trunkStateRollup', 'CLOSED_AND_LOCKED')%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('sensor.wdd2462081n170679_lock', 'trunkStateRollup', 'CLOSED_AND_LOCKED')%}
mdi:lock-outline
{% else %}
mdi:lock-open-variant-outline
{% endif %}
car_window_front_left:
friendly_name: Window Front Left
entity_id:
- binary_sensor.wdd2462081n170679_windows_closed
value_template: >-
{% if is_state_attr('binary_sensor.wdd2462081n170679_windows_closed', 'windowstatusfrontleft', 'CLOSED')%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('binary_sensor.wdd2462081n170679_windows_closed', 'windowstatusfrontleft', 'CLOSED')%}
mdi:window-closed-variant
{% else %}
mdi:window-open-variant
{% endif %}
car_window_front_right:
friendly_name: Window Front Right
entity_id:
- binary_sensor.wdd2462081n170679_windows_closed
value_template: >-
{% if is_state_attr('binary_sensor.wdd2462081n170679_windows_closed', 'windowstatusfrontright', 'CLOSED')%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('binary_sensor.wdd2462081n170679_windows_closed', 'windowstatusfrontright', 'CLOSED')%}
mdi:window-closed-variant
{% else %}
mdi:window-open-variant
{% endif %}
car_window_rear_left:
friendly_name: Window Rear Left
entity_id:
- binary_sensor.wdd2462081n170679_windows_closed
value_template: >-
{% if is_state_attr('binary_sensor.wdd2462081n170679_windows_closed', 'windowstatusrearleft', 'CLOSED')%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('binary_sensor.wdd2462081n170679_windows_closed', 'windowstatusrearleft', 'CLOSED')%}
mdi:window-closed-variant
{% else %}
mdi:window-open-variant
{% endif %}
car_window_rear_right:
friendly_name: Window Rear Right
entity_id:
- binary_sensor.wdd2462081n170679_windows_closed
value_template: >-
{% if is_state_attr('binary_sensor.wdd2462081n170679_windows_closed', 'windowstatusrearright', 'CLOSED')%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('binary_sensor.wdd2462081n170679_windows_closed', 'windowstatusrearright', 'CLOSED')%}
mdi:window-closed-variant
{% else %}
mdi:window-open-variant
{% endif %}
car_window_sunroof:
friendly_name: Window Sunroof
entity_id:
- sensor.wdd2462081n170679_lock
value_template: >-
{% if is_state_attr('sensor.wdd2462081n170679_lock', 'sunroofstatus', 'TILT_SLIDE_SUNROOF_CLOSED')%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('sensor.wdd2462081n170679_lock', 'sunroofstatus', 'TILT_SLIDE_SUNROOF_CLOSED')%}
mdi:window-closed-variant
{% else %}
mdi:window-open-variant
{% endif %}
In lovelace I use a picture element card to display the icons where I want them:
elements:
- entity: sensor.wdd2462081n170679_odometer
prefix: 'Odometer : '
style:
color: '#FFFFFF'
left: 50%
top: 15%
type: state-label
- entity: sensor.wdd2462081n170679_fuel_level
prefix: 'Gas : '
style:
color: '#FFFFFF'
left: 50%
top: 18%
type: state-label
- entity: sensor.car_tire_pressure_front_left
style:
color: '#FFFFFF'
left: 10%
top: 27%
type: state-label
- entity: sensor.car_tire_pressure_front_right
style:
color: '#FFFFFF'
left: 89%
top: 27%
type: state-label
- entity: sensor.car_tire_pressure_rear_left
style:
color: '#FFFFFF'
left: 10%
top: 81%
type: state-label
- entity: sensor.car_tire_pressure_rear_right
style:
color: '#FFFFFF'
left: 89%
top: 81%
type: state-label
- entity: sensor.car_lock_front_left
style:
'--paper-item-icon-color': white
left: 22%
top: 53%
type: state-icon
- entity: sensor.car_lock_front_right
style:
'--paper-item-icon-color': white
left: 78%
top: 53%
type: state-icon
- entity: sensor.car_lock_rear_left
style:
'--paper-item-icon-color': white
left: 22%
top: 73%
type: state-icon
- entity: sensor.car_lock_rear_right
style:
'--paper-item-icon-color': white
left: 78%
top: 73%
type: state-icon
- entity: sensor.car_lock_trunk
style:
'--paper-item-icon-color': white
left: 50%
top: 90%
type: state-icon
- entity: sensor.car_window_front_left
style:
'--paper-item-icon-color': white
left: 28%
top: 53%
type: state-icon
- entity: sensor.car_window_front_right
style:
'--paper-item-icon-color': white
left: 72%
top: 53%
type: state-icon
- entity: sensor.car_window_rear_left
style:
'--paper-item-icon-color': white
left: 28%
top: 73%
type: state-icon
- entity: sensor.car_window_rear_right
style:
'--paper-item-icon-color': white
left: 72%
top: 73%
type: state-icon
- entity: sensor.car_window_sunroof
style:
'--paper-item-icon-color': white
left: 50%
top: 55%
type: state-icon
- entity: binary_sensor.wdd2462081n170679_tire_warning
prefix: 'Tire alarm : '
style:
color: '#FFFFFF'
left: 15%
top: 1%
type: state-label
- entity: sensor.wdd2462081n170679_lock
prefix: 'Doors Locked : '
style:
color: '#FFFFFF'
left: 49%
top: 1%
type: state-label
- entity: binary_sensor.wdd2462081n170679_windows_closed
prefix: 'Windows closed : '
style:
color: '#FFFFFF'
left: 80%
top: 1%
type: state-label
image: /local/mercedes.jpg
title: Mercedes
type: picture-elements
Finally looking like this: