]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Added binary_sensor.ff590mr_fuel_lid
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Thu, 21 Nov 2019 15:25:06 +0000 (16:25 +0100)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Thu, 21 Nov 2019 15:25:06 +0000 (16:25 +0100)
binary_sensor/car.yaml
ui-lovelace.yaml

index 94758403874b1ef90efe91370b61afce1b4648de..a613263bad608388667456e04eff25c583a7665b 100644 (file)
         {% 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
 ######################################################################
index 5024ad8a98b9cd1b28f5755ebe93e60c66cb9493..027001ed2e17da8d277a935ad488465a19d0497a 100644 (file)
@@ -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