From 00f2f945a0189122e315ddf56874180af3c8c35d Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Thu, 21 Nov 2019 16:25:06 +0100 Subject: [PATCH] Added binary_sensor.ff590mr_fuel_lid --- binary_sensor/car.yaml | 19 +++++++++++++++++++ ui-lovelace.yaml | 1 + 2 files changed, 20 insertions(+) diff --git a/binary_sensor/car.yaml b/binary_sensor/car.yaml index 94758403..a613263b 100644 --- a/binary_sensor/car.yaml +++ b/binary_sensor/car.yaml @@ -117,6 +117,25 @@ {% endif %} device_class: opening +###################################################################### +# Binary Sensor: Fuel Lid +###################################################################### + +- platform: template + sensors: + ff590mr_fuel_lid: + friendly_name: Serbatoio + entity_id: sensor.ff590mr_lock + value_template: >- + {{ not is_state_attr('sensor.ff590mr_lock', 'fuelLidClosed', true) }} + icon_template: >- + {% if is_state_attr('sensor.ff590mr_lock', 'fuelLidClosed', true) %} + mdi:gas-station + {% else %} + mdi:gas-station + {% endif %} + device_class: opening + ###################################################################### # Binary Sensor: Windows Closed ###################################################################### diff --git a/ui-lovelace.yaml b/ui-lovelace.yaml index 5024ad8a..027001ed 100644 --- a/ui-lovelace.yaml +++ b/ui-lovelace.yaml @@ -1213,6 +1213,7 @@ views: - binary_sensor.ff590mr_door_rear_left - binary_sensor.ff590mr_door_rear_right - binary_sensor.ff590mr_trunk + - binary_sensor.ff590mr_fuel_lid - type: entities title: "Mercedes A200d: Finestrini" show_header_toggle: false -- 2.47.3