From: Giorgio Ravera Date: Sat, 25 Jul 2020 17:04:14 +0000 (+0200) Subject: renamed package file and added package away mode X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=4b9c927fb6040400bacba922ad9858679c333b9d;p=homeassistant.git renamed package file and added package away mode --- diff --git a/automations/away_mode.yaml b/automations/away_mode.yaml deleted file mode 100644 index 64bc9c3a..00000000 --- a/automations/away_mode.yaml +++ /dev/null @@ -1,44 +0,0 @@ -###################################################################### -# Away Mode: Enable Action -###################################################################### - -- alias: "Modalità Vacanza: Azione on" - initial_state: 'on' - - trigger: - - platform: state - entity_id: input_boolean.home_mode_away - to: 'on' - - action: - - service: script.notify_voice - data_template: - message: "Modalità vacanza abilitata" - -###################################################################### -# Away Mode: Disable Action -###################################################################### - -- alias: "Modalità Vacanza: Azione off" - initial_state: 'on' - - trigger: - # Manual Disable - - platform: state - entity_id: input_boolean.home_mode_away - to: 'off' - # Back home - - platform: state - entity_id: group.residents - to: 'home' - # End of Away Period - - platform: template - value_template: "{{ states('sensor.time_date') == (state_attr('input_datetime.away_mode_end', 'timestamp') | int | timestamp_custom('%H:%M, %Y-%m-%d', true)) }}" - - action: - - service: script.notify_voice - data_template: - message: "Modalità vacanza disabilitata" - - service: input_boolean.turn_off - data: - entity_id: input_boolean.home_mode_away diff --git a/packages/alarm/alarm_google.yaml b/packages/alarm/alarm_google.yaml new file mode 100644 index 00000000..a3d3c8ab --- /dev/null +++ b/packages/alarm/alarm_google.yaml @@ -0,0 +1,10 @@ +###################################################################### +# Mercedes Package - Google Assistant +###################################################################### + +google_assistant: + entity_config: + script.stop_alarm: + name: Disattiva Allarmi + expose: true + room: Routine diff --git a/packages/alarm/alarm_notifications.yaml b/packages/alarm/alarm_notifications.yaml new file mode 100644 index 00000000..016c8099 --- /dev/null +++ b/packages/alarm/alarm_notifications.yaml @@ -0,0 +1,130 @@ +###################################################################### +# Alarm Package - Notifications Scripts +###################################################################### + +script: + ###################################################################### + # Alarm: Start Alarm Sound + # + # Operations: + # - media_player.volume_set + # - media_player.play_media + ###################################################################### + start_alarm_sound: + alias: "Allarmi: Avvia Suono" + sequence: + - service: media_player.volume_set + data_template: + entity_id: 'media_player.google_home' + volume_level: 0.4 + + - service: media_player.play_media + data_template: + entity_id: 'media_player.google_home' + media_content_type: 'audio/mp4' + media_content_id: 'https://home.giorgioravera.it/local/audio/alarm.mp3' + + ###################################################################### + # Alarm: Stop Alarm Sound + # + # Operations: + # - media_player.media_stop + # - script.volume_manager + ###################################################################### + stop_alarm_sound: + alias: "Allarmi: Interrompi Suono" + sequence: + - service: media_player.media_stop + data_template: + entity_id: 'media_player.google_home' + + - service: script.volume_manager + data_template: + media_player: 'media_player.google_home' + + ###################################################################### + # Alarm: Start Alarm + # Inputs: + # - entity_id + # - title + # - message + # - level + # + # Operations: + # - input_boolean.turn_on + # - script.notify_all + # - script.start_alarm_sound + ###################################################################### + start_alarm: + alias: "Allarmi: Attiva Allarme" + sequence: + - service: input_boolean.turn_on + data_template: + entity_id: > + {# Check Null Input #} + {% if entity_id | length == 0 %} + {% set entity_id = 'input_boolean.generic_alarm' %} + {% endif %} + {{ entity_id }} + + # LEVEL 1 + - service: script.notify_all + data_template: + volume_level: 0.4 + language: 'it' + title: >- + {# Check Null Input #} + {% if title | length == 0 %} + {# Check Null Input #} + {% if entity_id | length == 0 %} + {% set entity_id = 'input_boolean.generic_alarm' %} + {% endif %} + {% set title = state_attr(entity_id, 'friendly_name') %} + {% endif %} + Home Assistant - {{ title }} + message: >- + {# Check Null Input #} + {% if message | length == 0 %} + {# Check Null Input #} + {% if entity_id | length == 0 %} + {% set entity_id = 'input_boolean.generic_alarm' %} + {% endif %} + {% set message = state_attr(entity_id, 'friendly_name') %} + {% endif %} + {{ message }} + enable_persistent: 1 + notification_id: "alarm" + + # LEVEL 2 + - condition: template + value_template: >- + {# Check Null Input #} + {% if level | length == 0 %} + {% set level = 1 %} + {% endif %} + {% if level | int >= 2 %} + true + {% else %} + false + {% endif %} + + - service: script.start_alarm_sound + + ###################################################################### + # Alarm: Stop Alarm + # + # Operations: + # - stop_alarm_sound + # - persistent_notification.dismiss + ###################################################################### + stop_alarm: + alias: "Allarmi: Disattiva Allarme" + sequence: + - service: homeassistant.turn_off + entity_id: group.alarms + + - service: script.stop_alarm_sound + + - service: persistent_notification.dismiss + data_template: + notification_id: "alarm" diff --git a/packages/alarm/alarm_triggers.yaml b/packages/alarm/alarm_triggers.yaml new file mode 100644 index 00000000..1f301a26 --- /dev/null +++ b/packages/alarm/alarm_triggers.yaml @@ -0,0 +1,30 @@ +###################################################################### +# Alarms Package - Triggers - Automations +###################################################################### + +automation: + ###################################################################### + # Alarm Door + # + # Actions: + # - script.notify_all + ###################################################################### + - alias: "Allarme Porta Casa" + initial_state: 'on' + + trigger: + - platform: state + entity_id: group.doors + to: 'on' + + condition: + - condition: state + entity_id: binary_sensor.guard_mode + state: 'on' + + action: + - service: script.start_alarm + data_template: + entity_id: input_boolean.door_alarm + message: "È stata rilevata una presenza non autorizzata." + level: 1 diff --git a/packages/alarm/google_alarms.yaml b/packages/alarm/google_alarms.yaml deleted file mode 100644 index a3d3c8ab..00000000 --- a/packages/alarm/google_alarms.yaml +++ /dev/null @@ -1,10 +0,0 @@ -###################################################################### -# Mercedes Package - Google Assistant -###################################################################### - -google_assistant: - entity_config: - script.stop_alarm: - name: Disattiva Allarmi - expose: true - room: Routine diff --git a/packages/alarm/notifications.yaml b/packages/alarm/notifications.yaml deleted file mode 100644 index 016c8099..00000000 --- a/packages/alarm/notifications.yaml +++ /dev/null @@ -1,130 +0,0 @@ -###################################################################### -# Alarm Package - Notifications Scripts -###################################################################### - -script: - ###################################################################### - # Alarm: Start Alarm Sound - # - # Operations: - # - media_player.volume_set - # - media_player.play_media - ###################################################################### - start_alarm_sound: - alias: "Allarmi: Avvia Suono" - sequence: - - service: media_player.volume_set - data_template: - entity_id: 'media_player.google_home' - volume_level: 0.4 - - - service: media_player.play_media - data_template: - entity_id: 'media_player.google_home' - media_content_type: 'audio/mp4' - media_content_id: 'https://home.giorgioravera.it/local/audio/alarm.mp3' - - ###################################################################### - # Alarm: Stop Alarm Sound - # - # Operations: - # - media_player.media_stop - # - script.volume_manager - ###################################################################### - stop_alarm_sound: - alias: "Allarmi: Interrompi Suono" - sequence: - - service: media_player.media_stop - data_template: - entity_id: 'media_player.google_home' - - - service: script.volume_manager - data_template: - media_player: 'media_player.google_home' - - ###################################################################### - # Alarm: Start Alarm - # Inputs: - # - entity_id - # - title - # - message - # - level - # - # Operations: - # - input_boolean.turn_on - # - script.notify_all - # - script.start_alarm_sound - ###################################################################### - start_alarm: - alias: "Allarmi: Attiva Allarme" - sequence: - - service: input_boolean.turn_on - data_template: - entity_id: > - {# Check Null Input #} - {% if entity_id | length == 0 %} - {% set entity_id = 'input_boolean.generic_alarm' %} - {% endif %} - {{ entity_id }} - - # LEVEL 1 - - service: script.notify_all - data_template: - volume_level: 0.4 - language: 'it' - title: >- - {# Check Null Input #} - {% if title | length == 0 %} - {# Check Null Input #} - {% if entity_id | length == 0 %} - {% set entity_id = 'input_boolean.generic_alarm' %} - {% endif %} - {% set title = state_attr(entity_id, 'friendly_name') %} - {% endif %} - Home Assistant - {{ title }} - message: >- - {# Check Null Input #} - {% if message | length == 0 %} - {# Check Null Input #} - {% if entity_id | length == 0 %} - {% set entity_id = 'input_boolean.generic_alarm' %} - {% endif %} - {% set message = state_attr(entity_id, 'friendly_name') %} - {% endif %} - {{ message }} - enable_persistent: 1 - notification_id: "alarm" - - # LEVEL 2 - - condition: template - value_template: >- - {# Check Null Input #} - {% if level | length == 0 %} - {% set level = 1 %} - {% endif %} - {% if level | int >= 2 %} - true - {% else %} - false - {% endif %} - - - service: script.start_alarm_sound - - ###################################################################### - # Alarm: Stop Alarm - # - # Operations: - # - stop_alarm_sound - # - persistent_notification.dismiss - ###################################################################### - stop_alarm: - alias: "Allarmi: Disattiva Allarme" - sequence: - - service: homeassistant.turn_off - entity_id: group.alarms - - - service: script.stop_alarm_sound - - - service: persistent_notification.dismiss - data_template: - notification_id: "alarm" diff --git a/packages/alarm/triggers.yaml b/packages/alarm/triggers.yaml deleted file mode 100644 index 1f301a26..00000000 --- a/packages/alarm/triggers.yaml +++ /dev/null @@ -1,30 +0,0 @@ -###################################################################### -# Alarms Package - Triggers - Automations -###################################################################### - -automation: - ###################################################################### - # Alarm Door - # - # Actions: - # - script.notify_all - ###################################################################### - - alias: "Allarme Porta Casa" - initial_state: 'on' - - trigger: - - platform: state - entity_id: group.doors - to: 'on' - - condition: - - condition: state - entity_id: binary_sensor.guard_mode - state: 'on' - - action: - - service: script.start_alarm - data_template: - entity_id: input_boolean.door_alarm - message: "È stata rilevata una presenza non autorizzata." - level: 1 diff --git a/packages/away_mode/away_mode_covers.yaml b/packages/away_mode/away_mode_covers.yaml new file mode 100644 index 00000000..712e6a99 --- /dev/null +++ b/packages/away_mode/away_mode_covers.yaml @@ -0,0 +1,45 @@ +###################################################################### +# Away Mode - Covers Management +###################################################################### + +automation: + + ###################################################################### + # Automation to manage cover in away mode + ###################################################################### + - alias: "Modalità Vacanza: Gestione Tapparelle" + #initial_state: 'on' + + trigger: + - platform: time + at: '09:00:00' + - platform: time + at: '18:00:00' + + condition: + - condition: state + entity_id: input_boolean.home_mode_away + state: 'on' + + action: + - service: cover.set_cover_position + data_template: + entity_id: + - cover.tapparella_sala + - cover.tapparella_camera + position: > + {% if now().strftime('%H')|int >= 9 and now().strftime('%H')|int < 18 %} + 50 + {% else %} + 0 + {% endif %} + +###################################################################### +# Mercedes Package - Customizations +###################################################################### + +homeassistant: + customize: + # Covers Away Automation + automation.modalita_vacanza_gestione_tapparelle: + icon: mdi:window-shutter diff --git a/packages/away_mode/away_mode_engine.yaml b/packages/away_mode/away_mode_engine.yaml new file mode 100644 index 00000000..47b2b7e0 --- /dev/null +++ b/packages/away_mode/away_mode_engine.yaml @@ -0,0 +1,48 @@ +###################################################################### +# Away Mode - Engine +###################################################################### + +automation: + + ###################################################################### + # Away Mode: Enable Action + ###################################################################### + - alias: "Modalità Vacanza: Azione on" + initial_state: 'on' + + trigger: + - platform: state + entity_id: input_boolean.home_mode_away + to: 'on' + + action: + - service: script.notify_voice + data_template: + message: "Modalità vacanza abilitata" + + ###################################################################### + # Away Mode: Disable Action + ###################################################################### + - alias: "Modalità Vacanza: Azione off" + initial_state: 'on' + + trigger: + # Manual Disable + - platform: state + entity_id: input_boolean.home_mode_away + to: 'off' + # Back home + - platform: state + entity_id: group.residents + to: 'home' + # End of Away Period + - platform: template + value_template: "{{ states('sensor.time_date') == (state_attr('input_datetime.away_mode_end', 'timestamp') | int | timestamp_custom('%H:%M, %Y-%m-%d', true)) }}" + + action: + - service: script.notify_voice + data_template: + message: "Modalità vacanza disabilitata" + - service: input_boolean.turn_off + data: + entity_id: input_boolean.home_mode_away diff --git a/packages/mercedes/binary_sensor.yaml b/packages/mercedes/binary_sensor.yaml deleted file mode 100644 index 6aa2c4c7..00000000 --- a/packages/mercedes/binary_sensor.yaml +++ /dev/null @@ -1,230 +0,0 @@ -###################################################################### -# Mercedes Package - Binary Sensor -###################################################################### - -binary_sensor: - ###################################################################### - # Binary Sensor: Doors Lock - ###################################################################### - - platform: template - sensors: - ff590mr_locked: - friendly_name: Vettura Bloccata - entity_id: lock.ff590mr_lock - value_template: >- - {{ not 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 - ###################################################################### - - platform: template - sensors: - ff590mr_doors_closed: - friendly_name: Porte - entity_id: sensor.ff590mr_lock - value_template: >- - {{ not is_state_attr('sensor.ff590mr_lock', 'doorsClosed', true) }} - icon_template: >- - {% if is_state_attr('sensor.ff590mr_lock', 'doorsClosed', true) %} - mdi:car-door - {% else %} - mdi:car-door - {% endif %} - device_class: opening - - ###################################################################### - # Binary Sensor: Door Front Left - ###################################################################### - - platform: template - sensors: - ff590mr_door_front_left: - friendly_name: Anteriore Sinistra - entity_id: sensor.ff590mr_lock - value_template: >- - {{ not (is_state_attr('sensor.ff590mr_lock', 'doorStateFrontLeft', 'DOOR_CLOSED_AND_DOOR_LOCKED') or - is_state_attr('sensor.ff590mr_lock', 'doorStateFrontLeft', 'DOOR_CLOSED_AND_DOOR_UNLOCKED')) }} - icon_template: mdi:car-door - device_class: opening - - ###################################################################### - # Binary Sensor: Door Front Right - ###################################################################### - - platform: template - sensors: - ff590mr_door_front_right: - friendly_name: Anteriore Destra - entity_id: sensor.ff590mr_lock - value_template: >- - {{ not (is_state_attr('sensor.ff590mr_lock', 'doorStateFrontRight', 'DOOR_CLOSED_AND_DOOR_LOCKED') or - is_state_attr('sensor.ff590mr_lock', 'doorStateFrontRight', 'DOOR_CLOSED_AND_DOOR_UNLOCKED')) }} - icon_template: mdi:car-door - device_class: opening - - ###################################################################### - # Binary Sensor: Door Rear Left - ###################################################################### - - platform: template - sensors: - ff590mr_door_rear_left: - friendly_name: Posteriore Sinistra - entity_id: sensor.ff590mr_lock - value_template: >- - {{ not (is_state_attr('sensor.ff590mr_lock', 'doorStateRearLeft', 'DOOR_CLOSED_AND_DOOR_LOCKED') or - is_state_attr('sensor.ff590mr_lock', 'doorStateRearLeft', 'DOOR_CLOSED_AND_DOOR_UNLOCKED')) }} - icon_template: mdi:car-door - device_class: opening - - ###################################################################### - # Binary Sensor: Door Rear Right - ###################################################################### - - platform: template - sensors: - ff590mr_door_rear_right: - friendly_name: Posteriore Destra - entity_id: sensor.ff590mr_lock - value_template: >- - {{ not (is_state_attr('sensor.ff590mr_lock', 'doorStateRearRight', 'DOOR_CLOSED_AND_DOOR_LOCKED') or - is_state_attr('sensor.ff590mr_lock', 'doorStateRearRight', 'DOOR_CLOSED_AND_DOOR_UNLOCKED')) }} - icon_template: mdi:car-door - device_class: opening - - ###################################################################### - # Binary Sensor: Trunk - ###################################################################### - - platform: template - sensors: - ff590mr_trunk: - friendly_name: Bagagliaio - entity_id: sensor.ff590mr_lock - value_template: >- - {{ not (is_state_attr('sensor.ff590mr_lock', 'trunkStateRollup', 'CLOSED_AND_LOCKED') or - is_state_attr('sensor.ff590mr_lock', 'trunkStateRollup', 'CLOSED_AND_UNLOCKED')) }} - icon_template: >- - {% if (is_state_attr('sensor.ff590mr_lock', 'trunkStateRollup', 'CLOSED_AND_LOCKED') or - is_state_attr('sensor.ff590mr_lock', 'trunkStateRollup', 'CLOSED_AND_UNLOCKED')) %} - mdi:lock - {% else %} - mdi:lock-open - {% 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 - ###################################################################### - - platform: template - sensors: - ff590mr_windows_closed_2: - friendly_name: Finestrini - entity_id: binary_sensor.ff590mr_windows_closed - value_template: >- - {{ not (is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontleft', 'CLOSED') and - is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontright', 'CLOSED') and - is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearleft', 'CLOSED') and - is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearright', 'CLOSED')) }} - icon_template: >- - {% if (is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontleft', 'CLOSED') and - is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontright', 'CLOSED') and - is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearleft', 'CLOSED') and - is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearright', 'CLOSED')) %} - mdi:window-closed - {% else %} - mdi:window-open - {% endif %} - device_class: opening - - ###################################################################### - # Binary Sensor: Window Front Left - ###################################################################### - - platform: template - sensors: - ff590mr_window_front_left: - friendly_name: Anteriore Sinistro - entity_id: binary_sensor.ff590mr_windows_closed - value_template: >- - {{ not is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontleft', 'CLOSED') }} - icon_template: >- - {% if is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontleft', 'CLOSED') %} - mdi:window-closed - {% else %} - mdi:window-open - {% endif %} - device_class: opening - - ###################################################################### - # Binary Sensor: Window Front Right - ###################################################################### - - platform: template - sensors: - ff590mr_window_front_right: - friendly_name: Anteriore Destro - entity_id: binary_sensor.ff590mr_windows_closed - value_template: >- - {{ not is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontright', 'CLOSED') }} - icon_template: >- - {% if is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontright', 'CLOSED') %} - mdi:window-closed - {% else %} - mdi:window-open - {% endif %} - device_class: opening - - ###################################################################### - # Binary Sensor: Window Rear Left - ###################################################################### - - platform: template - sensors: - ff590mr_window_rear_left: - friendly_name: Posteriore Sinistro - entity_id: binary_sensor.ff590mr_windows_closed - value_template: >- - {{ not is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearleft', 'CLOSED') }} - icon_template: >- - {% if is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearleft', 'CLOSED') %} - mdi:window-closed - {% else %} - mdi:window-open - {% endif %} - device_class: opening - - ###################################################################### - # Binary Sensor: Window Rear Right - ###################################################################### - - platform: template - sensors: - ff590mr_window_rear_right: - friendly_name: Posteriore Destro - entity_id: binary_sensor.ff590mr_windows_closed - value_template: >- - {{ not is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearright', 'CLOSED') }} - icon_template: >- - {% if is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearright', 'CLOSED') %} - mdi:window-closed - {% else %} - mdi:window-open - {% endif %} - device_class: opening diff --git a/packages/mercedes/customizations.yaml b/packages/mercedes/customizations.yaml deleted file mode 100644 index e14b8a24..00000000 --- a/packages/mercedes/customizations.yaml +++ /dev/null @@ -1,78 +0,0 @@ -###################################################################### -# Mercedes Package - Customizations -###################################################################### - -homeassistant: - customize: - # Stato Generale - binary_sensor.ff590mr_engine_light_warning: - friendly_name: Stato Generale - device_class: problem - icon: mdi:hazard-lights - # warningbrakefluid, warningwashwater, warningcoolantlevellow, warninglowbattery - - # Freno a Mano - #binary_sensor.ff590mr_park_brake_status: - # friendly_name: Freno a mano - # device_class: plug - # icon: mdi:car-brake-parking - # # preWarningBrakeLiningWear - - # Freni - binary_sensor.ff590mr_low_brake_fluid_warning: - friendly_name: Liquido Freni - device_class: problem - icon: mdi:car-brake-alert - - # Liquido Raffreddamento - binary_sensor.ff590mr_low_coolant_level_warning: - friendly_name: Liquido Raffreddamento - device_class: problem - icon: mdi:coolant-temperature - - # Liquido Lavacristalli - binary_sensor.ff590mr_low_wash_water_warning: - friendly_name: Liquido Lavacristalli - device_class: problem - icon: mdi:wiper-wash - - # Pneumatici - binary_sensor.ff590mr_tire_warning: - friendly_name: Pneumatici - device_class: problem - icon: mdi:car-tire-alert - # tirepressureRearLeft, tirepressureRearRight, tirepressureFrontRight, tirepressureFrontLeft, - # tirewarningsrdk, tirewarningsprwtireMarkerFrontRight, tireMarkerFrontLeft, tireMarkerRearLeft, tireMarkerRearRight, - # tireWarningRollup, lastTirepressureTimestamp - - # Finestrini - binary_sensor.ff590mr_windows_closed: - friendly_name: Finestrini - device_class: opening - icon: mdi:window-closed - # windowstatusrearleft, windowstatusrearright, windowstatusfrontright, windowstatusfrontleft - - # Lock - lock.ff590mr_lock: - friendly_name: Blocco Sblocco - icon: mdi:lock-open - - # Sensore Carburante - sensor.ff590mr_fuel_level: - friendly_name: Livello Carburante - icon: mdi:gas-station - - # Blocco Veicolo - sensor.ff590mr_lock: - friendly_name: Veicolo - icon: mdi:lock-open - # doorStateFrontLeft, doorStateFrontRight, doorStateRearLeft, doorStateRearRight, - # frontLeftDoorLocked, frontRightDoorLocked, rearLeftDoorLocked, rearRightDoorLocked, - # frontLeftDoorClosed, frontRightDoorClosed, rearLeftDoorClosed, rearRightDoorClosed, - # doorsClosed, trunkStateRollup, sunroofstatus - - # Odometria - sensor.ff590mr_odometer: - friendly_name: Km Percorsi - icon: mdi:road-variant - # distanceReset, distanceStart, liquidconsumptionstart, liquidconsumptionreset, liquidRangeSkipIndication, serviceintervaldays, tanklevelpercent, tankReserveLamp diff --git a/packages/mercedes/google_mercedes.yaml b/packages/mercedes/google_mercedes.yaml deleted file mode 100644 index 1b0ae69e..00000000 --- a/packages/mercedes/google_mercedes.yaml +++ /dev/null @@ -1,15 +0,0 @@ -###################################################################### -# 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 diff --git a/packages/mercedes/log.yaml b/packages/mercedes/log.yaml deleted file mode 100644 index fc15c11c..00000000 --- a/packages/mercedes/log.yaml +++ /dev/null @@ -1,126 +0,0 @@ -###################################################################### -# Mercedes Package - History -###################################################################### - -history: - exclude: - entities: - # Mercedes Me - - binary_sensor.ff590mr_door_front_left - - binary_sensor.ff590mr_door_front_right - - binary_sensor.ff590mr_door_rear_left - - binary_sensor.ff590mr_door_rear_right - #- binary_sensor.ff590mr_doors_closed - - binary_sensor.ff590mr_engine_light_warning - #- binary_sensor.ff590mr_locked - - binary_sensor.ff590mr_park_brake_status - - binary_sensor.ff590mr_tire_warning - - binary_sensor.ff590mr_trunk - - binary_sensor.ff590mr_fuel_lid - - binary_sensor.ff590mr_window_front_left - - binary_sensor.ff590mr_window_front_right - - binary_sensor.ff590mr_window_rear_left - - binary_sensor.ff590mr_window_rear_right - - binary_sensor.ff590mr_windows_closed - - lock.ff590mr_lock - - sensor.ff590mr_distance_since_reset - - sensor.ff590mr_distance_since_start - - sensor.ff590mr_door_front_left - - sensor.ff590mr_door_front_right - - sensor.ff590mr_door_rear_left - - sensor.ff590mr_door_rear_right - #- sensor.ff590mr_fuel_level - - sensor.ff590mr_liquid_consumption_reset - - sensor.ff590mr_liquid_consumption_start - - sensor.ff590mr_lock - #- sensor.ff590mr_odometer - - sensor.ff590mr_service_interval_days - - sensor.ff590mr_tire_pressure_front_left - - sensor.ff590mr_tire_pressure_front_right - - sensor.ff590mr_tire_pressure_rear_left - - sensor.ff590mr_tire_pressure_rear_right - - sensor.ff590mr_trunk - -###################################################################### -# Mercedes Package - Logbook -###################################################################### -logbook: - exclude: - entities: - # Mercedes Me - - binary_sensor.ff590mr_door_front_left - - binary_sensor.ff590mr_door_front_right - - binary_sensor.ff590mr_door_rear_left - - binary_sensor.ff590mr_door_rear_right - #- binary_sensor.ff590mr_doors_closed - - binary_sensor.ff590mr_engine_light_warning - #- binary_sensor.ff590mr_locked - - binary_sensor.ff590mr_park_brake_status - - binary_sensor.ff590mr_tire_warning - - binary_sensor.ff590mr_trunk - - binary_sensor.ff590mr_fuel_lid - - binary_sensor.ff590mr_window_front_left - - binary_sensor.ff590mr_window_front_right - - binary_sensor.ff590mr_window_rear_left - - binary_sensor.ff590mr_window_rear_right - - binary_sensor.ff590mr_windows_closed - - lock.ff590mr_lock - - sensor.ff590mr_distance_since_reset - - sensor.ff590mr_distance_since_start - - sensor.ff590mr_door_front_left - - sensor.ff590mr_door_front_right - - sensor.ff590mr_door_rear_left - - sensor.ff590mr_door_rear_right - #- sensor.ff590mr_fuel_level - - sensor.ff590mr_liquid_consumption_reset - - sensor.ff590mr_liquid_consumption_start - - sensor.ff590mr_lock - #- sensor.ff590mr_odometer - - sensor.ff590mr_service_interval_days - - sensor.ff590mr_tire_pressure_front_left - - sensor.ff590mr_tire_pressure_front_right - - sensor.ff590mr_tire_pressure_rear_left - - sensor.ff590mr_tire_pressure_rear_right - - sensor.ff590mr_trunk - -###################################################################### -# Mercedes Package - Recorder -###################################################################### -recorder: - exclude: - entities: - # Mercedes Me - - binary_sensor.ff590mr_door_front_left - - binary_sensor.ff590mr_door_front_right - - binary_sensor.ff590mr_door_rear_left - - binary_sensor.ff590mr_door_rear_right - #- binary_sensor.ff590mr_doors_closed - - binary_sensor.ff590mr_engine_light_warning - #- binary_sensor.ff590mr_locked - - binary_sensor.ff590mr_park_brake_status - - binary_sensor.ff590mr_tire_warning - - binary_sensor.ff590mr_trunk - - binary_sensor.ff590mr_fuel_lid - - binary_sensor.ff590mr_window_front_left - - binary_sensor.ff590mr_window_front_right - - binary_sensor.ff590mr_window_rear_left - - binary_sensor.ff590mr_window_rear_right - - binary_sensor.ff590mr_windows_closed - - lock.ff590mr_lock - - sensor.ff590mr_distance_since_reset - - sensor.ff590mr_distance_since_start - - sensor.ff590mr_door_front_left - - sensor.ff590mr_door_front_right - - sensor.ff590mr_door_rear_left - - sensor.ff590mr_door_rear_right - #- sensor.ff590mr_fuel_level - - sensor.ff590mr_liquid_consumption_reset - - sensor.ff590mr_liquid_consumption_start - - sensor.ff590mr_lock - #- sensor.ff590mr_odometer - - sensor.ff590mr_service_interval_days - - sensor.ff590mr_tire_pressure_front_left - - sensor.ff590mr_tire_pressure_front_right - - sensor.ff590mr_tire_pressure_rear_left - - sensor.ff590mr_tire_pressure_rear_right - - sensor.ff590mr_trunk diff --git a/packages/mercedes/mercedes_binary_sensor.yaml b/packages/mercedes/mercedes_binary_sensor.yaml new file mode 100644 index 00000000..6aa2c4c7 --- /dev/null +++ b/packages/mercedes/mercedes_binary_sensor.yaml @@ -0,0 +1,230 @@ +###################################################################### +# Mercedes Package - Binary Sensor +###################################################################### + +binary_sensor: + ###################################################################### + # Binary Sensor: Doors Lock + ###################################################################### + - platform: template + sensors: + ff590mr_locked: + friendly_name: Vettura Bloccata + entity_id: lock.ff590mr_lock + value_template: >- + {{ not 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 + ###################################################################### + - platform: template + sensors: + ff590mr_doors_closed: + friendly_name: Porte + entity_id: sensor.ff590mr_lock + value_template: >- + {{ not is_state_attr('sensor.ff590mr_lock', 'doorsClosed', true) }} + icon_template: >- + {% if is_state_attr('sensor.ff590mr_lock', 'doorsClosed', true) %} + mdi:car-door + {% else %} + mdi:car-door + {% endif %} + device_class: opening + + ###################################################################### + # Binary Sensor: Door Front Left + ###################################################################### + - platform: template + sensors: + ff590mr_door_front_left: + friendly_name: Anteriore Sinistra + entity_id: sensor.ff590mr_lock + value_template: >- + {{ not (is_state_attr('sensor.ff590mr_lock', 'doorStateFrontLeft', 'DOOR_CLOSED_AND_DOOR_LOCKED') or + is_state_attr('sensor.ff590mr_lock', 'doorStateFrontLeft', 'DOOR_CLOSED_AND_DOOR_UNLOCKED')) }} + icon_template: mdi:car-door + device_class: opening + + ###################################################################### + # Binary Sensor: Door Front Right + ###################################################################### + - platform: template + sensors: + ff590mr_door_front_right: + friendly_name: Anteriore Destra + entity_id: sensor.ff590mr_lock + value_template: >- + {{ not (is_state_attr('sensor.ff590mr_lock', 'doorStateFrontRight', 'DOOR_CLOSED_AND_DOOR_LOCKED') or + is_state_attr('sensor.ff590mr_lock', 'doorStateFrontRight', 'DOOR_CLOSED_AND_DOOR_UNLOCKED')) }} + icon_template: mdi:car-door + device_class: opening + + ###################################################################### + # Binary Sensor: Door Rear Left + ###################################################################### + - platform: template + sensors: + ff590mr_door_rear_left: + friendly_name: Posteriore Sinistra + entity_id: sensor.ff590mr_lock + value_template: >- + {{ not (is_state_attr('sensor.ff590mr_lock', 'doorStateRearLeft', 'DOOR_CLOSED_AND_DOOR_LOCKED') or + is_state_attr('sensor.ff590mr_lock', 'doorStateRearLeft', 'DOOR_CLOSED_AND_DOOR_UNLOCKED')) }} + icon_template: mdi:car-door + device_class: opening + + ###################################################################### + # Binary Sensor: Door Rear Right + ###################################################################### + - platform: template + sensors: + ff590mr_door_rear_right: + friendly_name: Posteriore Destra + entity_id: sensor.ff590mr_lock + value_template: >- + {{ not (is_state_attr('sensor.ff590mr_lock', 'doorStateRearRight', 'DOOR_CLOSED_AND_DOOR_LOCKED') or + is_state_attr('sensor.ff590mr_lock', 'doorStateRearRight', 'DOOR_CLOSED_AND_DOOR_UNLOCKED')) }} + icon_template: mdi:car-door + device_class: opening + + ###################################################################### + # Binary Sensor: Trunk + ###################################################################### + - platform: template + sensors: + ff590mr_trunk: + friendly_name: Bagagliaio + entity_id: sensor.ff590mr_lock + value_template: >- + {{ not (is_state_attr('sensor.ff590mr_lock', 'trunkStateRollup', 'CLOSED_AND_LOCKED') or + is_state_attr('sensor.ff590mr_lock', 'trunkStateRollup', 'CLOSED_AND_UNLOCKED')) }} + icon_template: >- + {% if (is_state_attr('sensor.ff590mr_lock', 'trunkStateRollup', 'CLOSED_AND_LOCKED') or + is_state_attr('sensor.ff590mr_lock', 'trunkStateRollup', 'CLOSED_AND_UNLOCKED')) %} + mdi:lock + {% else %} + mdi:lock-open + {% 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 + ###################################################################### + - platform: template + sensors: + ff590mr_windows_closed_2: + friendly_name: Finestrini + entity_id: binary_sensor.ff590mr_windows_closed + value_template: >- + {{ not (is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontleft', 'CLOSED') and + is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontright', 'CLOSED') and + is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearleft', 'CLOSED') and + is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearright', 'CLOSED')) }} + icon_template: >- + {% if (is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontleft', 'CLOSED') and + is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontright', 'CLOSED') and + is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearleft', 'CLOSED') and + is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearright', 'CLOSED')) %} + mdi:window-closed + {% else %} + mdi:window-open + {% endif %} + device_class: opening + + ###################################################################### + # Binary Sensor: Window Front Left + ###################################################################### + - platform: template + sensors: + ff590mr_window_front_left: + friendly_name: Anteriore Sinistro + entity_id: binary_sensor.ff590mr_windows_closed + value_template: >- + {{ not is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontleft', 'CLOSED') }} + icon_template: >- + {% if is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontleft', 'CLOSED') %} + mdi:window-closed + {% else %} + mdi:window-open + {% endif %} + device_class: opening + + ###################################################################### + # Binary Sensor: Window Front Right + ###################################################################### + - platform: template + sensors: + ff590mr_window_front_right: + friendly_name: Anteriore Destro + entity_id: binary_sensor.ff590mr_windows_closed + value_template: >- + {{ not is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontright', 'CLOSED') }} + icon_template: >- + {% if is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusfrontright', 'CLOSED') %} + mdi:window-closed + {% else %} + mdi:window-open + {% endif %} + device_class: opening + + ###################################################################### + # Binary Sensor: Window Rear Left + ###################################################################### + - platform: template + sensors: + ff590mr_window_rear_left: + friendly_name: Posteriore Sinistro + entity_id: binary_sensor.ff590mr_windows_closed + value_template: >- + {{ not is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearleft', 'CLOSED') }} + icon_template: >- + {% if is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearleft', 'CLOSED') %} + mdi:window-closed + {% else %} + mdi:window-open + {% endif %} + device_class: opening + + ###################################################################### + # Binary Sensor: Window Rear Right + ###################################################################### + - platform: template + sensors: + ff590mr_window_rear_right: + friendly_name: Posteriore Destro + entity_id: binary_sensor.ff590mr_windows_closed + value_template: >- + {{ not is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearright', 'CLOSED') }} + icon_template: >- + {% if is_state_attr('binary_sensor.ff590mr_windows_closed', 'windowstatusrearright', 'CLOSED') %} + mdi:window-closed + {% else %} + mdi:window-open + {% endif %} + device_class: opening diff --git a/packages/mercedes/mercedes_customizations.yaml b/packages/mercedes/mercedes_customizations.yaml new file mode 100644 index 00000000..e14b8a24 --- /dev/null +++ b/packages/mercedes/mercedes_customizations.yaml @@ -0,0 +1,78 @@ +###################################################################### +# Mercedes Package - Customizations +###################################################################### + +homeassistant: + customize: + # Stato Generale + binary_sensor.ff590mr_engine_light_warning: + friendly_name: Stato Generale + device_class: problem + icon: mdi:hazard-lights + # warningbrakefluid, warningwashwater, warningcoolantlevellow, warninglowbattery + + # Freno a Mano + #binary_sensor.ff590mr_park_brake_status: + # friendly_name: Freno a mano + # device_class: plug + # icon: mdi:car-brake-parking + # # preWarningBrakeLiningWear + + # Freni + binary_sensor.ff590mr_low_brake_fluid_warning: + friendly_name: Liquido Freni + device_class: problem + icon: mdi:car-brake-alert + + # Liquido Raffreddamento + binary_sensor.ff590mr_low_coolant_level_warning: + friendly_name: Liquido Raffreddamento + device_class: problem + icon: mdi:coolant-temperature + + # Liquido Lavacristalli + binary_sensor.ff590mr_low_wash_water_warning: + friendly_name: Liquido Lavacristalli + device_class: problem + icon: mdi:wiper-wash + + # Pneumatici + binary_sensor.ff590mr_tire_warning: + friendly_name: Pneumatici + device_class: problem + icon: mdi:car-tire-alert + # tirepressureRearLeft, tirepressureRearRight, tirepressureFrontRight, tirepressureFrontLeft, + # tirewarningsrdk, tirewarningsprwtireMarkerFrontRight, tireMarkerFrontLeft, tireMarkerRearLeft, tireMarkerRearRight, + # tireWarningRollup, lastTirepressureTimestamp + + # Finestrini + binary_sensor.ff590mr_windows_closed: + friendly_name: Finestrini + device_class: opening + icon: mdi:window-closed + # windowstatusrearleft, windowstatusrearright, windowstatusfrontright, windowstatusfrontleft + + # Lock + lock.ff590mr_lock: + friendly_name: Blocco Sblocco + icon: mdi:lock-open + + # Sensore Carburante + sensor.ff590mr_fuel_level: + friendly_name: Livello Carburante + icon: mdi:gas-station + + # Blocco Veicolo + sensor.ff590mr_lock: + friendly_name: Veicolo + icon: mdi:lock-open + # doorStateFrontLeft, doorStateFrontRight, doorStateRearLeft, doorStateRearRight, + # frontLeftDoorLocked, frontRightDoorLocked, rearLeftDoorLocked, rearRightDoorLocked, + # frontLeftDoorClosed, frontRightDoorClosed, rearLeftDoorClosed, rearRightDoorClosed, + # doorsClosed, trunkStateRollup, sunroofstatus + + # Odometria + sensor.ff590mr_odometer: + friendly_name: Km Percorsi + icon: mdi:road-variant + # distanceReset, distanceStart, liquidconsumptionstart, liquidconsumptionreset, liquidRangeSkipIndication, serviceintervaldays, tanklevelpercent, tankReserveLamp diff --git a/packages/mercedes/mercedes_google.yaml b/packages/mercedes/mercedes_google.yaml new file mode 100644 index 00000000..1b0ae69e --- /dev/null +++ b/packages/mercedes/mercedes_google.yaml @@ -0,0 +1,15 @@ +###################################################################### +# 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 diff --git a/packages/mercedes/mercedes_log.yaml b/packages/mercedes/mercedes_log.yaml new file mode 100644 index 00000000..fc15c11c --- /dev/null +++ b/packages/mercedes/mercedes_log.yaml @@ -0,0 +1,126 @@ +###################################################################### +# Mercedes Package - History +###################################################################### + +history: + exclude: + entities: + # Mercedes Me + - binary_sensor.ff590mr_door_front_left + - binary_sensor.ff590mr_door_front_right + - binary_sensor.ff590mr_door_rear_left + - binary_sensor.ff590mr_door_rear_right + #- binary_sensor.ff590mr_doors_closed + - binary_sensor.ff590mr_engine_light_warning + #- binary_sensor.ff590mr_locked + - binary_sensor.ff590mr_park_brake_status + - binary_sensor.ff590mr_tire_warning + - binary_sensor.ff590mr_trunk + - binary_sensor.ff590mr_fuel_lid + - binary_sensor.ff590mr_window_front_left + - binary_sensor.ff590mr_window_front_right + - binary_sensor.ff590mr_window_rear_left + - binary_sensor.ff590mr_window_rear_right + - binary_sensor.ff590mr_windows_closed + - lock.ff590mr_lock + - sensor.ff590mr_distance_since_reset + - sensor.ff590mr_distance_since_start + - sensor.ff590mr_door_front_left + - sensor.ff590mr_door_front_right + - sensor.ff590mr_door_rear_left + - sensor.ff590mr_door_rear_right + #- sensor.ff590mr_fuel_level + - sensor.ff590mr_liquid_consumption_reset + - sensor.ff590mr_liquid_consumption_start + - sensor.ff590mr_lock + #- sensor.ff590mr_odometer + - sensor.ff590mr_service_interval_days + - sensor.ff590mr_tire_pressure_front_left + - sensor.ff590mr_tire_pressure_front_right + - sensor.ff590mr_tire_pressure_rear_left + - sensor.ff590mr_tire_pressure_rear_right + - sensor.ff590mr_trunk + +###################################################################### +# Mercedes Package - Logbook +###################################################################### +logbook: + exclude: + entities: + # Mercedes Me + - binary_sensor.ff590mr_door_front_left + - binary_sensor.ff590mr_door_front_right + - binary_sensor.ff590mr_door_rear_left + - binary_sensor.ff590mr_door_rear_right + #- binary_sensor.ff590mr_doors_closed + - binary_sensor.ff590mr_engine_light_warning + #- binary_sensor.ff590mr_locked + - binary_sensor.ff590mr_park_brake_status + - binary_sensor.ff590mr_tire_warning + - binary_sensor.ff590mr_trunk + - binary_sensor.ff590mr_fuel_lid + - binary_sensor.ff590mr_window_front_left + - binary_sensor.ff590mr_window_front_right + - binary_sensor.ff590mr_window_rear_left + - binary_sensor.ff590mr_window_rear_right + - binary_sensor.ff590mr_windows_closed + - lock.ff590mr_lock + - sensor.ff590mr_distance_since_reset + - sensor.ff590mr_distance_since_start + - sensor.ff590mr_door_front_left + - sensor.ff590mr_door_front_right + - sensor.ff590mr_door_rear_left + - sensor.ff590mr_door_rear_right + #- sensor.ff590mr_fuel_level + - sensor.ff590mr_liquid_consumption_reset + - sensor.ff590mr_liquid_consumption_start + - sensor.ff590mr_lock + #- sensor.ff590mr_odometer + - sensor.ff590mr_service_interval_days + - sensor.ff590mr_tire_pressure_front_left + - sensor.ff590mr_tire_pressure_front_right + - sensor.ff590mr_tire_pressure_rear_left + - sensor.ff590mr_tire_pressure_rear_right + - sensor.ff590mr_trunk + +###################################################################### +# Mercedes Package - Recorder +###################################################################### +recorder: + exclude: + entities: + # Mercedes Me + - binary_sensor.ff590mr_door_front_left + - binary_sensor.ff590mr_door_front_right + - binary_sensor.ff590mr_door_rear_left + - binary_sensor.ff590mr_door_rear_right + #- binary_sensor.ff590mr_doors_closed + - binary_sensor.ff590mr_engine_light_warning + #- binary_sensor.ff590mr_locked + - binary_sensor.ff590mr_park_brake_status + - binary_sensor.ff590mr_tire_warning + - binary_sensor.ff590mr_trunk + - binary_sensor.ff590mr_fuel_lid + - binary_sensor.ff590mr_window_front_left + - binary_sensor.ff590mr_window_front_right + - binary_sensor.ff590mr_window_rear_left + - binary_sensor.ff590mr_window_rear_right + - binary_sensor.ff590mr_windows_closed + - lock.ff590mr_lock + - sensor.ff590mr_distance_since_reset + - sensor.ff590mr_distance_since_start + - sensor.ff590mr_door_front_left + - sensor.ff590mr_door_front_right + - sensor.ff590mr_door_rear_left + - sensor.ff590mr_door_rear_right + #- sensor.ff590mr_fuel_level + - sensor.ff590mr_liquid_consumption_reset + - sensor.ff590mr_liquid_consumption_start + - sensor.ff590mr_lock + #- sensor.ff590mr_odometer + - sensor.ff590mr_service_interval_days + - sensor.ff590mr_tire_pressure_front_left + - sensor.ff590mr_tire_pressure_front_right + - sensor.ff590mr_tire_pressure_rear_left + - sensor.ff590mr_tire_pressure_rear_right + - sensor.ff590mr_trunk diff --git a/packages/mercedes/mercedes_sensor.yaml b/packages/mercedes/mercedes_sensor.yaml new file mode 100644 index 00000000..03d1fcce --- /dev/null +++ b/packages/mercedes/mercedes_sensor.yaml @@ -0,0 +1,206 @@ +###################################################################### +# Mercedes Package - Sensor +###################################################################### + +sensor: + ###################################################################### + # Sensor: Tire Pressure Front Left + ###################################################################### + - platform: template + sensors: + ff590mr_tire_pressure_front_left: + friendly_name: Anteriore Sinistra + entity_id: sensor.ff590mr_lock + unit_of_measurement: 'kPa' + value_template: "{{ state_attr('binary_sensor.ff590mr_tire_warning', 'tirepressureFrontLeft') }}" + icon_template: mdi:car-tire-alert + device_class: pressure + + ###################################################################### + # Sensor: Tire Pressure Front Right + ###################################################################### + - platform: template + sensors: + ff590mr_tire_pressure_front_right: + friendly_name: Anteriore Destra + entity_id: sensor.ff590mr_lock + unit_of_measurement: 'kPa' + value_template: "{{ state_attr('binary_sensor.ff590mr_tire_warning', 'tirepressureFrontRight') }}" + icon_template: mdi:car-tire-alert + device_class: pressure + + ###################################################################### + # Sensor: Tire Pressure Rear Left + ###################################################################### + - platform: template + sensors: + ff590mr_tire_pressure_rear_left: + friendly_name: Posteriore Sinistra + entity_id: sensor.ff590mr_lock + unit_of_measurement: 'kPa' + value_template: "{{ state_attr('binary_sensor.ff590mr_tire_warning', 'tirepressureRearLeft') }}" + icon_template: mdi:car-tire-alert + device_class: pressure + + ###################################################################### + # Sensor: Tire Pressure Rear Right + ###################################################################### + - platform: template + sensors: + ff590mr_tire_pressure_rear_right: + friendly_name: Posteriore Destra + entity_id: sensor.ff590mr_lock + unit_of_measurement: 'kPa' + value_template: "{{ state_attr('binary_sensor.ff590mr_tire_warning', 'tirepressureRearRight') }}" + icon_template: mdi:car-tire-alert + device_class: pressure + + ###################################################################### + # Sensor: Door Front Left + ###################################################################### + #- platform: template + # sensors: + # ff590mr_door_front_left: + # friendly_name: Anteriore Sinistra + # entity_id: sensor.ff590mr_lock + # value_template: >- + # {% if is_state_attr('sensor.ff590mr_lock', 'doorStateFrontLeft', 'DOOR_CLOSED_AND_DOOR_LOCKED') %} + # Chiusa e Bloccata + # {% elif is_state_attr('sensor.ff590mr_lock', 'doorStateFrontLeft', 'DOOR_CLOSED_AND_DOOR_UNLOCKED') %} + # Chiuse + # {% else %} + # Aperta + # {% endif %} + # icon_template: mdi:car-door + + ###################################################################### + # Sensor: Door Front Right + ###################################################################### + #- platform: template + # sensors: + # ff590mr_door_front_right: + # friendly_name: Anteriore Destra + # entity_id: sensor.ff590mr_lock + # value_template: >- + # {% if is_state_attr('sensor.ff590mr_lock', 'doorStateFrontRight', 'DOOR_CLOSED_AND_DOOR_LOCKED') %} + # Chiusa e Bloccata + # {% elif is_state_attr('sensor.ff590mr_lock', 'doorStateFrontRight', 'DOOR_CLOSED_AND_DOOR_UNLOCKED') %} + # Chiuse + # {% else %} + # Aperta + # {% endif %} + # icon_template: mdi:car-door + + ###################################################################### + # Sensor: Door Rear Left + ###################################################################### + #- platform: template + # sensors: + # ff590mr_door_rear_left: + # friendly_name: Posteriore Sinistra + # entity_id: sensor.ff590mr_lock + # value_template: >- + # {% if is_state_attr('sensor.ff590mr_lock', 'doorStateRearLeft', 'DOOR_CLOSED_AND_DOOR_LOCKED') %} + # Chiusa e Bloccata + # {% elif is_state_attr('sensor.ff590mr_lock', 'doorStateRearLeft', 'DOOR_CLOSED_AND_DOOR_UNLOCKED') %} + # Chiuse + # {% else %} + # Aperta + # {% endif %} + # icon_template: mdi:car-door + + ###################################################################### + # Sensor: Door Rear Right + ###################################################################### + #- platform: template + # sensors: + # ff590mr_door_rear_right: + # friendly_name: Posteriore Destra + # entity_id: sensor.ff590mr_lock + # value_template: >- + # {% if is_state_attr('sensor.ff590mr_lock', 'doorStateRearRight', 'DOOR_CLOSED_AND_DOOR_LOCKED') %} + # Chiusa e Bloccata + # {% elif is_state_attr('sensor.ff590mr_lock', 'doorStateRearRight', 'DOOR_CLOSED_AND_DOOR_UNLOCKED') %} + # Chiuse + # {% else %} + # Aperta + # {% endif %} + # icon_template: mdi:car-door + + ###################################################################### + # Sensor: Trunk + ###################################################################### + #- platform: template + # sensors: + # ff590mr_trunk: + # friendly_name: Bagagliaio + # entity_id: sensor.ff590mr_lock + # value_template: >- + # {% if is_state_attr('sensor.ff590mr_lock', 'trunkStateRollup', 'CLOSED_AND_LOCKED') %} + # Chiuso e Bloccato + # {% elif is_state_attr('sensor.ff590mr_lock', 'trunkStateRollup', 'CLOSED_AND_UNLOCKED') %} + # Chiuso + # {% else %} + # Aperto + # {% endif %} + # icon_template: mdi:car-door + + ###################################################################### + # Sensor: Distance from Start + ###################################################################### + - platform: template + sensors: + ff590mr_distance_since_start: + friendly_name: Distanza dalla partenza + entity_id: sensor.ff590mr_odometer + unit_of_measurement: 'Km' + value_template: "{{ state_attr('sensor.ff590mr_odometer', 'distanceStart') }}" + icon_template: mdi:road-variant + + ###################################################################### + # Sensor: Distance from Reset + ###################################################################### + - platform: template + sensors: + ff590mr_distance_since_reset: + friendly_name: Distanza dal reset + entity_id: sensor.ff590mr_odometer + unit_of_measurement: 'Km' + value_template: "{{ state_attr('sensor.ff590mr_odometer', 'distanceReset') }}" + icon_template: mdi:road-variant + + ###################################################################### + # Sensor: Liquid Consumption from Start + ###################################################################### + - platform: template + sensors: + ff590mr_liquid_consumption_start: + friendly_name: Consumo dalla partenza + entity_id: sensor.ff590mr_odometer + unit_of_measurement: 'l/100Km' + value_template: "{{ state_attr('sensor.ff590mr_odometer', 'liquidconsumptionstart') }}" + icon_template: mdi:gas-station + + ###################################################################### + # Sensor: Liquid Consumption from Reset + ###################################################################### + - platform: template + sensors: + ff590mr_liquid_consumption_reset: + friendly_name: Consumo dal reset + entity_id: sensor.ff590mr_odometer + unit_of_measurement: 'l/100Km' + value_template: "{{ state_attr('sensor.ff590mr_odometer', 'liquidconsumptionreset') }}" + icon_template: mdi:gas-station + + ###################################################################### + # Sensor: Service Interval Days + ###################################################################### + - platform: template + sensors: + ff590mr_service_interval_days: + friendly_name: Prossimo Tagliando + entity_id: sensor.ff590mr_odometer + unit_of_measurement: 'giorni' + value_template: "{{ state_attr('sensor.ff590mr_odometer', 'serviceintervaldays') }}" + icon_template: mdi:wrench diff --git a/packages/mercedes/mercedes_switch.yaml b/packages/mercedes/mercedes_switch.yaml new file mode 100644 index 00000000..eed88f53 --- /dev/null +++ b/packages/mercedes/mercedes_switch.yaml @@ -0,0 +1,23 @@ +###################################################################### +# Mercedes Package - Switch +###################################################################### + +switch: + - platform: template + switches: + ff590mr_lock: + friendly_name: Blocco Auto + entity_id: lock.ff590mr_lock + 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 %} diff --git a/packages/mercedes/sensor.yaml b/packages/mercedes/sensor.yaml deleted file mode 100644 index 03d1fcce..00000000 --- a/packages/mercedes/sensor.yaml +++ /dev/null @@ -1,206 +0,0 @@ -###################################################################### -# Mercedes Package - Sensor -###################################################################### - -sensor: - ###################################################################### - # Sensor: Tire Pressure Front Left - ###################################################################### - - platform: template - sensors: - ff590mr_tire_pressure_front_left: - friendly_name: Anteriore Sinistra - entity_id: sensor.ff590mr_lock - unit_of_measurement: 'kPa' - value_template: "{{ state_attr('binary_sensor.ff590mr_tire_warning', 'tirepressureFrontLeft') }}" - icon_template: mdi:car-tire-alert - device_class: pressure - - ###################################################################### - # Sensor: Tire Pressure Front Right - ###################################################################### - - platform: template - sensors: - ff590mr_tire_pressure_front_right: - friendly_name: Anteriore Destra - entity_id: sensor.ff590mr_lock - unit_of_measurement: 'kPa' - value_template: "{{ state_attr('binary_sensor.ff590mr_tire_warning', 'tirepressureFrontRight') }}" - icon_template: mdi:car-tire-alert - device_class: pressure - - ###################################################################### - # Sensor: Tire Pressure Rear Left - ###################################################################### - - platform: template - sensors: - ff590mr_tire_pressure_rear_left: - friendly_name: Posteriore Sinistra - entity_id: sensor.ff590mr_lock - unit_of_measurement: 'kPa' - value_template: "{{ state_attr('binary_sensor.ff590mr_tire_warning', 'tirepressureRearLeft') }}" - icon_template: mdi:car-tire-alert - device_class: pressure - - ###################################################################### - # Sensor: Tire Pressure Rear Right - ###################################################################### - - platform: template - sensors: - ff590mr_tire_pressure_rear_right: - friendly_name: Posteriore Destra - entity_id: sensor.ff590mr_lock - unit_of_measurement: 'kPa' - value_template: "{{ state_attr('binary_sensor.ff590mr_tire_warning', 'tirepressureRearRight') }}" - icon_template: mdi:car-tire-alert - device_class: pressure - - ###################################################################### - # Sensor: Door Front Left - ###################################################################### - #- platform: template - # sensors: - # ff590mr_door_front_left: - # friendly_name: Anteriore Sinistra - # entity_id: sensor.ff590mr_lock - # value_template: >- - # {% if is_state_attr('sensor.ff590mr_lock', 'doorStateFrontLeft', 'DOOR_CLOSED_AND_DOOR_LOCKED') %} - # Chiusa e Bloccata - # {% elif is_state_attr('sensor.ff590mr_lock', 'doorStateFrontLeft', 'DOOR_CLOSED_AND_DOOR_UNLOCKED') %} - # Chiuse - # {% else %} - # Aperta - # {% endif %} - # icon_template: mdi:car-door - - ###################################################################### - # Sensor: Door Front Right - ###################################################################### - #- platform: template - # sensors: - # ff590mr_door_front_right: - # friendly_name: Anteriore Destra - # entity_id: sensor.ff590mr_lock - # value_template: >- - # {% if is_state_attr('sensor.ff590mr_lock', 'doorStateFrontRight', 'DOOR_CLOSED_AND_DOOR_LOCKED') %} - # Chiusa e Bloccata - # {% elif is_state_attr('sensor.ff590mr_lock', 'doorStateFrontRight', 'DOOR_CLOSED_AND_DOOR_UNLOCKED') %} - # Chiuse - # {% else %} - # Aperta - # {% endif %} - # icon_template: mdi:car-door - - ###################################################################### - # Sensor: Door Rear Left - ###################################################################### - #- platform: template - # sensors: - # ff590mr_door_rear_left: - # friendly_name: Posteriore Sinistra - # entity_id: sensor.ff590mr_lock - # value_template: >- - # {% if is_state_attr('sensor.ff590mr_lock', 'doorStateRearLeft', 'DOOR_CLOSED_AND_DOOR_LOCKED') %} - # Chiusa e Bloccata - # {% elif is_state_attr('sensor.ff590mr_lock', 'doorStateRearLeft', 'DOOR_CLOSED_AND_DOOR_UNLOCKED') %} - # Chiuse - # {% else %} - # Aperta - # {% endif %} - # icon_template: mdi:car-door - - ###################################################################### - # Sensor: Door Rear Right - ###################################################################### - #- platform: template - # sensors: - # ff590mr_door_rear_right: - # friendly_name: Posteriore Destra - # entity_id: sensor.ff590mr_lock - # value_template: >- - # {% if is_state_attr('sensor.ff590mr_lock', 'doorStateRearRight', 'DOOR_CLOSED_AND_DOOR_LOCKED') %} - # Chiusa e Bloccata - # {% elif is_state_attr('sensor.ff590mr_lock', 'doorStateRearRight', 'DOOR_CLOSED_AND_DOOR_UNLOCKED') %} - # Chiuse - # {% else %} - # Aperta - # {% endif %} - # icon_template: mdi:car-door - - ###################################################################### - # Sensor: Trunk - ###################################################################### - #- platform: template - # sensors: - # ff590mr_trunk: - # friendly_name: Bagagliaio - # entity_id: sensor.ff590mr_lock - # value_template: >- - # {% if is_state_attr('sensor.ff590mr_lock', 'trunkStateRollup', 'CLOSED_AND_LOCKED') %} - # Chiuso e Bloccato - # {% elif is_state_attr('sensor.ff590mr_lock', 'trunkStateRollup', 'CLOSED_AND_UNLOCKED') %} - # Chiuso - # {% else %} - # Aperto - # {% endif %} - # icon_template: mdi:car-door - - ###################################################################### - # Sensor: Distance from Start - ###################################################################### - - platform: template - sensors: - ff590mr_distance_since_start: - friendly_name: Distanza dalla partenza - entity_id: sensor.ff590mr_odometer - unit_of_measurement: 'Km' - value_template: "{{ state_attr('sensor.ff590mr_odometer', 'distanceStart') }}" - icon_template: mdi:road-variant - - ###################################################################### - # Sensor: Distance from Reset - ###################################################################### - - platform: template - sensors: - ff590mr_distance_since_reset: - friendly_name: Distanza dal reset - entity_id: sensor.ff590mr_odometer - unit_of_measurement: 'Km' - value_template: "{{ state_attr('sensor.ff590mr_odometer', 'distanceReset') }}" - icon_template: mdi:road-variant - - ###################################################################### - # Sensor: Liquid Consumption from Start - ###################################################################### - - platform: template - sensors: - ff590mr_liquid_consumption_start: - friendly_name: Consumo dalla partenza - entity_id: sensor.ff590mr_odometer - unit_of_measurement: 'l/100Km' - value_template: "{{ state_attr('sensor.ff590mr_odometer', 'liquidconsumptionstart') }}" - icon_template: mdi:gas-station - - ###################################################################### - # Sensor: Liquid Consumption from Reset - ###################################################################### - - platform: template - sensors: - ff590mr_liquid_consumption_reset: - friendly_name: Consumo dal reset - entity_id: sensor.ff590mr_odometer - unit_of_measurement: 'l/100Km' - value_template: "{{ state_attr('sensor.ff590mr_odometer', 'liquidconsumptionreset') }}" - icon_template: mdi:gas-station - - ###################################################################### - # Sensor: Service Interval Days - ###################################################################### - - platform: template - sensors: - ff590mr_service_interval_days: - friendly_name: Prossimo Tagliando - entity_id: sensor.ff590mr_odometer - unit_of_measurement: 'giorni' - value_template: "{{ state_attr('sensor.ff590mr_odometer', 'serviceintervaldays') }}" - icon_template: mdi:wrench diff --git a/packages/mercedes/switch.yaml b/packages/mercedes/switch.yaml deleted file mode 100644 index eed88f53..00000000 --- a/packages/mercedes/switch.yaml +++ /dev/null @@ -1,23 +0,0 @@ -###################################################################### -# Mercedes Package - Switch -###################################################################### - -switch: - - platform: template - switches: - ff590mr_lock: - friendly_name: Blocco Auto - entity_id: lock.ff590mr_lock - 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 %}