From 567dbfe1c515c3d63e743ab30b44f0d18d6792c4 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Thu, 17 Oct 2024 09:19:00 -0700 Subject: [PATCH] Remove deprecated YAML proximity configuration --- automations/climate.yaml | 4 ++-- automations/music.yaml | 2 +- configuration.yaml | 1 - includes/notify.yaml | 6 ------ includes/proximity.yaml | 17 ----------------- includes/sensors.yaml | 4 ++-- 6 files changed, 5 insertions(+), 29 deletions(-) delete mode 100644 includes/proximity.yaml diff --git a/automations/climate.yaml b/automations/climate.yaml index 02eab79d7..cbf0d129e 100755 --- a/automations/climate.yaml +++ b/automations/climate.yaml @@ -26,7 +26,7 @@ - alias: "Climate: turn on the heating when going home" triggers: trigger: numeric_state - entity_id: proximity.home + entity_id: sensor.home_nearest_distance below: 6 above: 1 conditions: @@ -36,7 +36,7 @@ - condition: time after: "16:00:00" before: "22:00:00" - - "{{ is_state_attr('proximity.home', 'dir_of_travel', 'towards') }}" + - "{{ is_state('sensor.home_nearest_direction_of_travel', 'towards') }}" - "{{ not is_state_attr('climate.thermostat', 'temperature', states('input_number.temperature_high')) }}" - condition: state entity_id: binary_sensor.no_one_home diff --git a/automations/music.yaml b/automations/music.yaml index 83813aab1..b4d7cb7f7 100644 --- a/automations/music.yaml +++ b/automations/music.yaml @@ -40,7 +40,7 @@ - "{{ is_state('media_player.spotify', 'playing') }}" - "{{ as_timestamp(now()) - as_timestamp(states.person.bas.last_changed) < 5 * 60 }}" # recently got home - condition: numeric_state - entity_id: proximity.home + entity_id: sensor.home_nearest_distance below: 2 actions: - action: media_player.turn_on diff --git a/configuration.yaml b/configuration.yaml index b848ed8e0..4f8caa9b2 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -44,7 +44,6 @@ shell_command: !include includes/shell_commands.yaml notify: !include includes/notify.yaml light: !include includes/lights.yaml wake_on_lan: -proximity: !include includes/proximity.yaml timer: !include includes/timers.yaml ios: !include includes/ios.yaml homekit: !include includes/homekit.yaml diff --git a/includes/notify.yaml b/includes/notify.yaml index 7adfe5549..8f42c0a20 100644 --- a/includes/notify.yaml +++ b/includes/notify.yaml @@ -39,9 +39,3 @@ - service: mobile_app_marcella_iphone_14_pro - service: tv - service: chrome - -- platform: html5 - name: chrome - vapid_pub_key: !secret firebase_public_key - vapid_prv_key: !secret firebase_private_key - vapid_email: !secret firebase_service_account diff --git a/includes/proximity.yaml b/includes/proximity.yaml deleted file mode 100644 index 8d8069470..000000000 --- a/includes/proximity.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -#- -# _ _ _ -# _ __ _ __ _____ _(_)_ __ ___ (_) |_ _ _ -# | '_ \| '__/ _ \ \/ / | '_ ` _ \| | __| | | | -# | |_) | | | (_) > <| | | | | | | | |_| |_| | -# | .__/|_| \___/_/\_\_|_| |_| |_|_|\__|\__, | -# |_| |___/ -# -#- from github.com/basnijholt/home-assistant-config -home: - ignored_zones: - - work - devices: - - device_tracker.basnijholt_iphone - - device_tracker.marcella_iphone - tolerance: 50 diff --git a/includes/sensors.yaml b/includes/sensors.yaml index 44c15b527..843c8a02c 100755 --- a/includes/sensors.yaml +++ b/includes/sensors.yaml @@ -74,7 +74,7 @@ favorite_playlist_of_nearest_person: value_template: > - {% if is_state_attr("proximity.home", "nearest", "basnijholt-iphone") %} + {% if is_state_attr("sensor.home_nearest_device", "Bas") %} 6rPTm9dYftKcFAfwyRqmDZ {% else %} 6rPTm9dYftKcFAfwyRqmDZ @@ -224,7 +224,7 @@ value_template: > {% if is_state("person.bas", "home") and is_state("person.marcella", "home") %} notify.all_iphones - {% elif is_state_attr("proximity.home", "nearest", "basnijholt-iphone") %} + {% elif is_state_attr("sensor.home_nearest_device", "Bas") %} notify.iphone_bas {% else %} notify.mobile_app_marcella_iphone