}
]
},
+ {
+ "type": "custom:bar-card",
+ "entities": [
+ {
+ "entity": "sensor.valve_cucina_battery",
+ "name": "Cucina",
+ "width": "85%"
+ },
+ {
+ "entity": "sensor.valve_sala_battery",
+ "name": "Sala",
+ "width": "85%"
+ },
+ {
+ "entity": "sensor.valve_studio_battery",
+ "name": "Studio",
+ "width": "85%"
+ },
+ {
+ "entity": "sensor.valve_bagno_battery",
+ "name": "Bagno",
+ "width": "85%"
+ },
+ {
+ "entity": "sensor.valve_camera_da_letto_battery",
+ "name": "Camera",
+ "width": "85%"
+ }
+ ],
+ "title": "Batteria Valvole Netatmo",
+ "show_header_toggle": false,
+ "state_color": false,
+ "positions": {
+ "icon": "off",
+ "indicator": "off",
+ "name": "outside",
+ "value": "outside"
+ }
+ },
{
"type": "history-graph",
"entities": [
"type": "state-icon"
},
{
- "entity": "binary_sensor.ff590mr_locked",
+ "entity": "lock.ff590mr_lock",
"prefix": "",
"style": {
"color": "#FFFFFF",
+++ /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('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