hacs_token: 0
+mb_vin: vin
+
netatmo_client_id: client_id
netatmo_client_secret: password
{
"entities": [
{
- "entity": "binary_sensor.ff590mr_locked"
+ "entity": "lock.ff590mr_lock"
},
{
"entity": "binary_sensor.ff590mr_doors_closed"
# Lock
lock.ff590mr_lock:
- friendly_name: Blocco Sblocco
- icon: mdi:lock-open
+ friendly_name: Blocco Auto
+ icon: mdi:lock
# Sensore Carburante
sensor.ff590mr_fuel_level:
--- /dev/null
+######################################################################
+# Mercedes Package - Google Assistant
+######################################################################
+
+google_assistant:
+ entity_config:
+# switch.ff590mr_lock:
+# name: Blocco Auto
+# expose: true
+# room: Generale
+
+ lock.ff590mr_lock:
+ name: Auto
+ expose: true
+ room: Generale
+++ /dev/null
-######################################################################
-# Mercedes Package - Google Assistant
-######################################################################
-
-google_assistant:
- entity_config:
-# switch.ff590mr_lock:
-# name: Blocco Auto
-# expose: true
-# room: Generale
-
- lock.ff590mr_lock:
- name: Auto
- expose: true
- room: Generale
--- /dev/null
+######################################################################
+# Mercedes Package - Switch
+######################################################################
+
+#switch:
+# - platform: template
+# switches:
+# ff590mr_lock:
+# friendly_name: Blocco Auto
+# value_template: "{{ is_state('binary_sensor.ff590mr_locked', 'off') }}"
+# turn_on:
+# - service: mbapi2020.doors_lock
+# data:
+# vin: !secret mb_vin
+# turn_off:
+# - service: mbapi2020.doors_unlock
+# data:
+# vin: !secret mb_vin
+# icon_template: >-
+# {% if is_state('binary_sensor.ff590mr_locked', 'off') %}
+# mdi:lock
+# {% else %}
+# mdi:lock-open
+# {% endif %}
+
+lock:
+ - platform: template
+ name: ff590mr_lock
+ value_template: "{{ is_state('binary_sensor.ff590mr_locked', 'off') }}"
+ optimistic: true
+ lock:
+ - service: mbapi2020.doors_lock
+ data:
+ vin: !secret mb_vin
+ unlock:
+ - service: mbapi2020.doors_unlock
+ data:
+ vin: !secret mb_vin
+++ /dev/null
-######################################################################
-# Mercedes Package - Switch
-######################################################################
-
-switch:
- - platform: template
- switches:
- ff590mr_lock:
- friendly_name: Blocco Auto
- value_template: "{{ is_state('lock.ff590mr_lock', 'locked') }}"
- turn_on:
- - service: lock.lock
- entity_id: lock.ff590mr_lock
- turn_off:
- - service: lock.unlock
- entity_id: lock.ff590mr_lock
- icon_template: >-
- {% if is_state('lock.ff590mr_lock', 'locked') %}
- mdi:lock
- {% else %}
- mdi:lock-open
- {% endif %}