From e95607051aeab52b734d21d22fd9f6fa20f61d64 Mon Sep 17 00:00:00 2001 From: Kevin Eifinger Date: Sat, 15 May 2021 19:35:47 +0200 Subject: [PATCH 1/6] change order of zone alert --- packages/zone.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/zone.yaml b/packages/zone.yaml index ee9e7b1..8d26363 100644 --- a/packages/zone.yaml +++ b/packages/zone.yaml @@ -35,10 +35,6 @@ automation: entity_id: "person.sina" zone: "zone.elmo" event: "enter" - condition: - - alias: "Only if Kevin is not nearby" - condition: template - value_template: "{{ distance('device_tracker.sm_g975f', 'device_tracker.oneplus_a3003') < 1 }}" action: - alias: "Wait until Sina leaves Zone again" wait_for_trigger: @@ -50,6 +46,9 @@ automation: - alias: "Only continue when at least 30 minutes in zone" condition: template value_template: "{{ wait.completed }}" + - alias: "Only if Kevin is not nearby" + condition: template + value_template: "{{ distance('device_tracker.sm_g975f', 'device_tracker.oneplus_a3003') < 1 }}" - alias: "Update travel time home of Sina" service: homeassistant.update_entity entity_id: sensor.travel_time_home_user_two_here From 42b2543d30521c57c9b0ff259183183284a2c65b Mon Sep 17 00:00:00 2001 From: Kevin Eifinger Date: Sat, 15 May 2021 19:38:39 +0200 Subject: [PATCH 2/6] Remove version.yaml --- packages/version.yaml | 54 ------------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 packages/version.yaml diff --git a/packages/version.yaml b/packages/version.yaml deleted file mode 100644 index 8c5d554..0000000 --- a/packages/version.yaml +++ /dev/null @@ -1,54 +0,0 @@ ---- -sensor: - - platform: version - source: docker - - platform: version - source: local - ################################################################# - ## Available Unifi Version - ################################################################# - # https://community.home-assistant.io/t/sensor-for-latest-docker-image-versions/4874 - - platform: command_line - name: Unifi Controller Latest Docker - # yamllint disable-line rule:line-length - command: curl -s -L https://registry.hub.docker.com/v2/repositories/jacobalberty/unifi/tags/ | grep -Eo '"name":\s"[0-9]*[.]+[0-9]*[.]+[0-9]*"' | head -1 | sed -e "s/\"name\":\s\"/${replace}/g" | sed -e "s/\"/${replace}/g" - scan_interval: 28800 - -automation: - ################################################################# - ## New Unifi Controller Version - ################################################################# - - id: ed9c5ff8-b4f2-4763-a347-57ad487dd12b - alias: 'Notify of new Unifi Controller Version' - initial_state: true - trigger: - - platform: state - entity_id: sensor.unifi_controller_latest_docker - action: - - service: notify.kevin - data: - message: "Neue Unifi Controller Version verfügbar: {{states.sensor.unifi_controller_latest_docker.state}}" - condition: - condition: template - value_template: > - {{ trigger.to_state.state not in [trigger.from_state.state, 'unavailable'] }} - ################################################################# - ## New Home Assistant Version - ################################################################# - - id: a8a91979-2f53-48f2-88fe-935a2340558e - alias: 'Notify of new Homeassistant Version' - initial_state: true - trigger: - - platform: state - entity_id: sensor.latest_version - action: - - service: notify.kevin - data: - message: "Neue Homeassistant Version verfügbar: {{states.sensor.latest_version.state}}" - condition: - - condition: template - value_template: > - {{ trigger.to_state.state not in [trigger.from_state.state, 'unavailable', 'unknown'] }} - - condition: template - value_template: > - {{ trigger.from_state.state not in ['unavailable', 'unknown'] }} From 16d237609a71286524abe7e423b7748b8d800693 Mon Sep 17 00:00:00 2001 From: Kevin Eifinger Date: Sat, 15 May 2021 19:39:07 +0200 Subject: [PATCH 3/6] Remove uptime.yaml --- packages/uptime.yaml | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 packages/uptime.yaml diff --git a/packages/uptime.yaml b/packages/uptime.yaml deleted file mode 100644 index 01c22b6..0000000 --- a/packages/uptime.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -sensor: - - platform: uptime - name: Uptime - unit_of_measurement: minutes From 005dbec6a525a32aa5032caa6af83af14632bb1c Mon Sep 17 00:00:00 2001 From: Kevin Eifinger Date: Sat, 15 May 2021 19:45:20 +0200 Subject: [PATCH 4/6] Remove notification for warm_bath_before_wakeup --- packages/next_alarm.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/next_alarm.yaml b/packages/next_alarm.yaml index b548996..4a6af3b 100644 --- a/packages/next_alarm.yaml +++ b/packages/next_alarm.yaml @@ -77,6 +77,3 @@ script: data: entity_id: "{{ climate_entity_id }}" temperature: "{{ old_temperature }}" - - service: notify.group_notifications - data: - message: "Ich habe {{ state_attr(climate_entity_id, 'friendly_name') }} auf {{ old_temperature }}C° gestellt." From ff26c9ec11499a1c7a68e619020dab08651eb500 Mon Sep 17 00:00:00 2001 From: Kevin Eifinger Date: Sat, 15 May 2021 19:50:14 +0200 Subject: [PATCH 5/6] Add echo dot alarm to next_alarm --- packages/next_alarm.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/next_alarm.yaml b/packages/next_alarm.yaml index 4a6af3b..db714a3 100644 --- a/packages/next_alarm.yaml +++ b/packages/next_alarm.yaml @@ -24,6 +24,12 @@ automation: ((as_timestamp(states.sensor.oneplus_a3003_nachster_wecker.state) | int - 7200) | timestamp_custom('%Y-%m-%d, %H:%M', True)) and (states('person.sina') == 'home') }} + - platform: template + value_template: > + {{ states('sensor.date_time') == + ((as_timestamp(states.sensor.kevin_s_echo_dot_schlafzimmer_next_alarm.state) + | int - 7200) | timestamp_custom('%Y-%m-%d, %H:%M', True)) + and (states('person.sina') == 'home') }} action: - service: script.turn_on entity_id: script.warm_bath_before_wakeup From f193181d4d0f20bd663dc9ad7bae9415fca4510d Mon Sep 17 00:00:00 2001 From: Kevin Eifinger Date: Sun, 16 May 2021 23:38:30 +0200 Subject: [PATCH 6/6] Leave Zone wait.remaining == 0 --- packages/zone.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zone.yaml b/packages/zone.yaml index 8d26363..ff16455 100644 --- a/packages/zone.yaml +++ b/packages/zone.yaml @@ -45,7 +45,7 @@ automation: timeout: "00:30:00" - alias: "Only continue when at least 30 minutes in zone" condition: template - value_template: "{{ wait.completed }}" + value_template: "{{ wait.remaining == 0 }}" - alias: "Only if Kevin is not nearby" condition: template value_template: "{{ distance('device_tracker.sm_g975f', 'device_tracker.oneplus_a3003') < 1 }}"