Thanks. I couldn’t get it all to work using yaml so a couple of entities are created in node red.
Obviously credit to Ronin @Mobiledude for doing the heavy lifting.
sensor:
- platform: template
sensors:
car_lock_status:
friendly_name: Car Lock Status
value_template: >-
{% if is_state('sensor.wd70kwf_lock', '2')%}
Locked
{% else %}
Open
{% endif %}
car_status_update:
friendly_name: Car Status
value_template: '{{ states.sensor.wd70kwf_car.attributes.last_message_received }}'
car_status_message:
friendly_name: Last Message
value_template: '{{ states.sensor.wd70kwf_car.attributes.last_command_type }}'
car_soc:
friendly_name: State of Charge
value_template: '{{ states.sensor.wd70kwf_range_electric.attributes.soc }}'
car_tire_pressure_rear_left:
friendly_name: Tire pressure Rear Left
value_template: '{{ states.binary_sensor.wd70kwf_tire_warning.attributes.tirepressureRearLeft }}'
car_tire_pressure_rear_right:
friendly_name: Tire pressure Rear Right
value_template: '{{ states.binary_sensor.wd70kwf_tire_warning.attributes.tirepressureRearRight }}'
car_tire_pressure_front_left:
friendly_name: Tire pressure Front Left
value_template: '{{ states.binary_sensor.wd70kwf_tire_warning.attributes.tirepressureFrontLeft }}'
car_tire_pressure_front_right:
friendly_name: Tire pressure Front Right
value_template: '{{ states.binary_sensor.wd70kwf_tire_warning.attributes.tirepressureFrontRight }}'
car_lock_front_right:
friendly_name: Lock Front Right
value_template: >-
{% if is_state_attr('sensor.wd70kwf_lock', 'doorlockstatusfrontright', false)%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('sensor.wd70kwf_lock', 'doorlockstatusfrontright', false)%}
mdi:lock-outline
{% else %}
mdi:lock-open-variant-outline
{% endif %}
car_lock_front_left:
friendly_name: Lock Front Left
value_template: >-
{% if is_state_attr('sensor.wd70kwf_lock', 'doorlockstatusfrontleft', false)%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('sensor.wd70kwf_lock', 'doorlockstatusfrontleft', false)%}
mdi:lock-outline
{% else %}
mdi:lock-open-variant-outline
{% endif %}
car_lock_rear_right:
friendly_name: Lock Rear Right
value_template: >-
{% if is_state_attr('sensor.wd70kwf_lock', 'doorlockstatusrearright', false)%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('sensor.wd70kwf_lock', 'doorlockstatusrearright', false)%}
mdi:lock-outline
{% else %}
mdi:lock-open-variant-outline
{% endif %}
car_lock_rear_left:
friendly_name: Lock Rear Left
value_template: >-
{% if is_state_attr('sensor.wd70kwf_lock', 'doorlockstatusrearleft', false)%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('sensor.wd70kwf_lock', 'doorlockstatusrearleft', false)%}
mdi:lock-outline
{% else %}
mdi:lock-open-variant-outline
{% endif %}
car_lock_trunk:
friendly_name: Lock trunk
value_template: >-
{% if is_state_attr('sensor.wd70kwf_lock', 'decklidstatus', false)%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('sensor.wd70kwf_lock', 'decklidstatus', false)%}
mdi:lock-outline
{% else %}
mdi:lock-open-variant-outline
{% endif %}
car_lock_hood:
friendly_name: Lock hood
value_template: >-
{% if is_state_attr('sensor.wd70kwf_lock', 'hoodStateRollup', false)%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('sensor.wd70kwf_lock', 'hoodStateRollup', false)%}
mdi:lock-outline
{% else %}
mdi:lock-open-variant-outline
{% endif %}
car_window_front_left:
friendly_name: Window Front Left
value_template: >-
{% if is_state_attr('binary_sensor.wd70kwf_windows_closed', 'windowstatusfrontleft', '2')%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('binary_sensor.wd70kwf_windows_closed', 'windowstatusfrontleft', '2')%}
mdi:window-closed
{% else %}
mdi:window-open
{% endif %}
car_window_front_right:
friendly_name: Window Front Right
value_template: >-
{% if is_state_attr('binary_sensor.wd70kwf_windows_closed', 'windowstatusfrontright', '2')%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('binary_sensor.wd70kwf_windows_closed', 'windowstatusfrontright', '2')%}
mdi:window-closed
{% else %}
mdi:window-open
{% endif %}
car_window_rear_left:
friendly_name: Window Rear Left
value_template: >-
{% if is_state_attr('binary_sensor.wd70kwf_windows_closed', 'windowstatusrearleft', '2')%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('binary_sensor.wd70kwf_windows_closed', 'windowstatusrearleft', '2')%}
mdi:window-closed
{% else %}
mdi:window-open
{% endif %}
car_window_rear_right:
friendly_name: Window Rear Right
value_template: >-
{% if is_state_attr('binary_sensor.wd70kwf_windows_closed', 'windowstatusrearright', '2')%}
Closed
{% else %}
Open
{% endif %}
icon_template: >
{% if is_state_attr('binary_sensor.wd70kwf_windows_closed', 'windowstatusrearright', '2')%}
mdi:window-closed
{% else %}
mdi:window-open
{% endif %}
Node red flow
[
{
"id": "efcc3827.c8f078",
"type": "tab",
"label": "Car",
"disabled": false,
"info": ""
},
{
"id": "12e228.11de2dd9",
"type": "api-current-state",
"z": "efcc3827.c8f078",
"name": "eqc",
"server": "c630b835.1ec538",
"version": 1,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"override_topic": false,
"entity_id": "sensor.wd70kwf_range_electric",
"state_type": "str",
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"blockInputOverrides": false,
"x": 210,
"y": 140,
"wires": [
[
"7fe099f1.b30e88",
"b5511fbc.5c781",
"17d7c3fb.f63e9c"
]
]
},
{
"id": "eeae60c8.5e2f",
"type": "inject",
"z": "efcc3827.c8f078",
"name": "5 min",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "300",
"crontab": "",
"once": true,
"onceDelay": "10",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 90,
"y": 140,
"wires": [
[
"12e228.11de2dd9"
]
]
},
{
"id": "7fe099f1.b30e88",
"type": "function",
"z": "efcc3827.c8f078",
"name": "SOC",
"func": "var newMsg = { payload: msg.data.attributes.soc };\nreturn newMsg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 370,
"y": 80,
"wires": [
[]
]
},
{
"id": "b5511fbc.5c781",
"type": "ha-entity",
"z": "efcc3827.c8f078",
"name": "Range in m",
"server": "c630b835.1ec538",
"version": 1,
"debugenabled": false,
"outputs": 1,
"entityType": "sensor",
"config": [
{
"property": "name",
"value": "rangeinmiles"
},
{
"property": "device_class",
"value": ""
},
{
"property": "icon",
"value": ""
},
{
"property": "unit_of_measurement",
"value": ""
}
],
"state": "payload",
"stateType": "msg",
"attributes": [],
"resend": true,
"outputLocation": "",
"outputLocationType": "none",
"inputOverride": "allow",
"outputOnStateChange": false,
"outputPayload": "$entity().state ? \"on\": \"off\"",
"outputPayloadType": "jsonata",
"x": 390,
"y": 140,
"wires": [
[]
]
},
{
"id": "17d7c3fb.f63e9c",
"type": "function",
"z": "efcc3827.c8f078",
"name": "Charging",
"func": "var newMsg = { payload: msg.data.attributes.chargingactive };\nreturn newMsg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 380,
"y": 200,
"wires": [
[
"6b2a970e.0ab9e8"
]
]
},
{
"id": "6b2a970e.0ab9e8",
"type": "switch",
"z": "efcc3827.c8f078",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
},
{
"t": "false"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 510,
"y": 200,
"wires": [
[
"a8dc59c0.e52258"
],
[
"8eba6e18.5e51f"
]
]
},
{
"id": "a8dc59c0.e52258",
"type": "change",
"z": "efcc3827.c8f078",
"name": "true = Yes",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Yes",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 640,
"y": 180,
"wires": [
[
"6fa870a5.4813c"
]
]
},
{
"id": "8eba6e18.5e51f",
"type": "change",
"z": "efcc3827.c8f078",
"name": "false = No",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "No",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 640,
"y": 220,
"wires": [
[
"6fa870a5.4813c"
]
]
},
{
"id": "6fa870a5.4813c",
"type": "ha-entity",
"z": "efcc3827.c8f078",
"name": "Lovelace",
"server": "c630b835.1ec538",
"version": 1,
"debugenabled": false,
"outputs": 1,
"entityType": "sensor",
"config": [
{
"property": "name",
"value": "chargestatus"
},
{
"property": "device_class",
"value": ""
},
{
"property": "icon",
"value": ""
},
{
"property": "unit_of_measurement",
"value": ""
}
],
"state": "payload",
"stateType": "msg",
"attributes": [],
"resend": true,
"outputLocation": "",
"outputLocationType": "none",
"inputOverride": "allow",
"outputOnStateChange": false,
"outputPayload": "$entity().state ? \"on\": \"off\"",
"outputPayloadType": "jsonata",
"x": 780,
"y": 200,
"wires": [
[]
]
},
{
"id": "c630b835.1ec538",
"type": "server",
"name": "Home Assistant",
"legacy": false,
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true
}
]
lovelace grid card (omit style: | at the end if you don’t have those card enhancements installed) :
type: grid
cards:
- type: picture-elements
elements:
- entity: sensor.car_status_update
style:
transform: 'translate(-50%, -50%) scale(0.8, 0.8)'
color: lightgrey
left: 15%
top: 92%
type: state-label
- entity: sensor.car_status_message
style:
transform: 'translate(-50%, -50%) scale(0.8, 0.8)'
color: lightgrey
left: 15%
top: 96.5%
type: state-label
- type: state-icon
entity: lock.wd70kwf_lock
tap-action:
action: toggle
icon: 'mdi:car-door'
name: Door locks
style:
transform: 'translate(-50%, -50%) scale(1.3, 1.3)'
color: red
left: 67%
top: 60%
- entity: sensor.chargestatus
style:
transform: 'translate(-50%, -50%) scale(0.9, 0.9)'
color: lightgrey
left: 57.5%
top: 18%
type: state-label
- entity: sensor.car_soc
prefix: ''
suffix: '%'
style:
transform: 'translate(-50%, -50%) scale(1.3, 1.3)'
color: lightgrey
left: 15%
top: 17%
type: state-label
- entity: sensor.rangeinmiles
prefix: ' '
suffix: ' miles'
style:
transform: 'translate(-50%, -50%) scale(1.3, 1.3)'
color: lightgrey
left: 39%
top: 17%
type: state-label
- entity: binary_sensor.wd70kwf_tire_warning
prefix: ''
style:
transform: 'translate(-50%, -50%) scale(0.7, 0.7)'
color: '#FFFFFF'
left: 66.5%
top: 17.5%
type: state-icon
- entity: binary_sensor.wd70kwf_low_brake_fluid_warning
prefix: ''
style:
transform: 'translate(-50%, -50%) scale(0.7, 0.7)'
color: '#FFFFFF'
left: 76%
top: 17.5%
type: state-icon
- entity: binary_sensor.wd70kwf_low_wash_water_warning
prefix: ''
style:
transform: 'translate(-50%, -50%) scale(0.7, 0.7)'
color: '#FFFFFF'
left: 95%
top: 17.5%
type: state-icon
- entity: sensor.car_tire_pressure_front_right
style:
transform: 'translate(-50%, -50%) scale(0.8, 0.8)'
color: lightgrey
left: 38%
top: 32%
type: state-label
- entity: sensor.car_tire_pressure_rear_right
style:
transform: 'translate(-50%, -50%) scale(0.8, 0.8)'
color: lightgrey
left: 84%
top: 32%
type: state-label
- entity: sensor.car_tire_pressure_front_left
style:
transform: 'translate(-50%, -50%) scale(0.7, 0.7)'
color: lightgrey
left: 38%
top: 90%
type: state-label
- entity: sensor.car_tire_pressure_rear_left
style:
transform: 'translate(-50%, -50%) scale(0.8, 0.8)'
color: lightgrey
left: 84%
top: 90%
type: state-label
- entity: sensor.car_lock_front_right
style:
'--paper-item-icon-color': white
transform: 'translate(-50%, -50%) scale(0.7, 0.7)'
left: 61%
top: 38%
type: state-icon
- entity: sensor.car_lock_rear_right
style:
'--paper-item-icon-color': white
transform: 'translate(-50%, -50%) scale(0.7, 0.7)'
left: 68%
top: 38%
type: state-icon
- entity: sensor.car_lock_front_left
style:
'--paper-item-icon-color': white
transform: 'translate(-50%, -50%) scale(0.7, 0.7)'
left: 61%
top: 83%
type: state-icon
- entity: sensor.car_lock_rear_left
style:
'--paper-item-icon-color': white
transform: 'translate(-50%, -50%) scale(0.7, 0.7)'
left: 68%
top: 83%
type: state-icon
- entity: sensor.car_lock_trunk
style:
'--paper-item-icon-color': white
transform: 'translate(-50%, -50%) scale(0.7, 0.7)'
left: 95%
top: 60%
type: state-icon
- entity: sensor.car_window_front_right
style:
'--paper-item-icon-color': lightgrey
transform: 'translate(-50%, -50%) scale(0.7, 0.7)'
left: 56%
top: 31%
type: state-icon
- entity: sensor.car_window_rear_right
style:
'--paper-item-icon-color': lightgrey
transform: 'translate(-50%, -50%) scale(0.7, 0.7)'
left: 73%
top: 31%
type: state-icon
- entity: sensor.car_window_front_left
style:
'--paper-item-icon-color': lightgrey
transform: 'translate(-50%, -50%) scale(0.7, 0.7)'
left: 56%
top: 90%
type: state-icon
- entity: sensor.car_window_rear_left
style:
'--paper-item-icon-color': lightgrey
transform: 'translate(-50%, -50%) scale(0.7, 0.7)'
left: 73%
top: 90%
type: state-icon
- entity: binary_sensor.wd70kwf_park_brake_status
prefix: ''
style:
transform: 'translate(-50%, -50%) scale(0.6, 0.6)'
color: '#FFFFFF'
left: 11%
top: 42%
type: state-icon
- entity: binary_sensor.wd70kwf_windows_closed
prefix: ''
style:
transform: 'translate(-50%, -50%) scale(0.6, 0.6)'
color: '#FFFFFF'
left: 11%
top: 52%
type: state-icon
icon: null
- entity: sensor.car_lock_status
prefix: ''
style:
color: '#FFFFFF'
left: 13%
top: 64%
type: state-label
- entity: device_tracker.wd70kwf_device_tracker
prefix: ''
style:
color: lightgrey
left: 12%
top: 77%
type: state-label
image: /local/mercnew4.png
- type: picture-elements
elements:
- type: service-button
title: Deactivate
service: mbapi2020.preheat_stop
service_data:
vin: yourvinnumber
target: {}
icon: 'hass:radiator-off'
style:
top: 80%
left: 80%
- type: service-button
title: Activate
service: mbapi2020.preheat_start
service_data:
vin: yourvinnumber
target: {}
icon: 'hass:radiator'
style:
top: 20%
left: 20%
image: /local/climate.PNG
style: |
ha-card {
background-color: var(--primary-background-color);
border-radius: 10px;
margin: 15px;
box-shadow:
-4px -4px 8px rgba(255, 255, 255, .5), 5px 5px 8px rgba(0, 0, 0, .03);
}
columns: 1
square: false
Preheat background graphic climate.PNG
mercnew4.png
I think that’s everything