From: Giorgio Ravera Date: Tue, 3 Sep 2019 19:59:32 +0000 (+0200) Subject: Restored car lock sensor X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=3f5b8e0e5fb18c7ca325c80a0d77065fd9d8f747;p=homeassistant.git Restored car lock sensor --- diff --git a/binary_sensor/car.yaml b/binary_sensor/car.yaml index d509c49b..a1976bc1 100644 --- a/binary_sensor/car.yaml +++ b/binary_sensor/car.yaml @@ -1,3 +1,22 @@ +###################################################################### +# Binary Sensor: Doors Lock +###################################################################### + +- platform: template + sensors: + ff590mr_locked: + friendly_name: Vettura Bloccata + entity_id: lock.ff590mr_lock + value_template: >- + {{ is_state('lock.ff590mr_lock', 'locked') }} + icon_template: >- + {% if is_state('lock.ff590mr_lock', 'locked') %} + mdi:lock + {% else %} + mdi:lock-open + {% endif %} + device_class: lock + ###################################################################### # Binary Sensor: Doors Closed ###################################################################### diff --git a/script/speech_engine.yaml b/script/speech_engine.yaml index 583e8c5f..f83dc07b 100644 --- a/script/speech_engine.yaml +++ b/script/speech_engine.yaml @@ -106,7 +106,7 @@ speech_engine: {% else %} {% set car_position = "fuori" %} {% endif %} - {% if is_state('lock.ff590mr_lock', 'locked') %} + {% if is_state('binary_sensor.ff590mr_locked', 'off') %} {% set car_lock = "chiusa" %} {% else %} {% set car_lock = "aperta" %}