From: Giorgio Ravera Date: Wed, 12 Jun 2019 12:13:12 +0000 (+0200) Subject: Added inputs to lock/unlock car X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=cee60043915984183695c9b0ba0e574efe2e7ce4;p=homeassistant.git Added inputs to lock/unlock car --- diff --git a/automation/car.yaml b/automation/car.yaml new file mode 100644 index 00000000..b45e4cd9 --- /dev/null +++ b/automation/car.yaml @@ -0,0 +1,72 @@ +###################################################################### +# Car: FF590MR lock/unlock Button Management +###################################################################### + +- alias: "FF590MR Pulsante Blocca Vettura" + initial_state: 'on' + + trigger: + - platform: state + entity_id: lock.ff590mr_lock + to: 'locked' + - platform: homeassistant + event: start + + condition: + - condition: state + entity_id: lock.ff590mr_lock + state: 'locked' + + action: + - service: input_boolean.turn_on + data_template: + entity_id: input_boolean.ff590mr_lock + +- alias: "FF590MR Pulsante Sblocca Vettura" + initial_state: 'on' + + trigger: + - platform: state + entity_id: lock.ff590mr_lock + to: 'unlocked' + - platform: homeassistant + event: start + + condition: + - condition: state + entity_id: lock.ff590mr_lock + state: 'unlocked' + + action: + - service: input_boolean.turn_off + data_template: + entity_id: input_boolean.ff590mr_lock + +###################################################################### +# Car: FF590MR lock/unlock +###################################################################### + +- alias: "FF590MR Blocca Vettura" + initial_state: 'on' + + trigger: + - platform: state + entity_id: input_boolean.ff590mr_lock + to: 'on' + + action: + - service: lock.lock + entity_id: lock.ff590mr_lock + +- alias: "FF590MR Sblocca Vettura" + initial_state: 'on' + + trigger: + - platform: state + entity_id: input_boolean.ff590mr_lock + to: 'off' + + action: + - service: lock.unlock + entity_id: lock.ff590mr_unlock + diff --git a/components/google_assistant.yaml b/components/google_assistant.yaml index 877434c5..a3b693bf 100644 --- a/components/google_assistant.yaml +++ b/components/google_assistant.yaml @@ -67,11 +67,16 @@ entity_config: media_player.tv_sala: room: Sala expose: true -# Script & Routine - input_boolean.home_mode_away: +# Inputs +input_boolean.home_mode_away: name: Modalità Vacanza room: Generale expose: true +input_boolean.ff590mr_lock: + name: Blocco Auto + room: Generale + expose: true +# Routine script.speech_status: expose: true room: Generale diff --git a/input_boolean/car.yaml b/input_boolean/car.yaml new file mode 100644 index 00000000..95ca552b --- /dev/null +++ b/input_boolean/car.yaml @@ -0,0 +1,8 @@ +###################################################################### +# Inputs: Lock +###################################################################### + +ff590mr_lock: + name: Blocco Auto + icon: mdi:lock +