Refactor notification actions in automation files to use notify.notify_events instead of mobile app notifications. This change applies to alerts for washing machine leaks, cat medication tracking, and litter box monitoring, streamlining the notification process.

This commit is contained in:
Joshua King
2026-07-07 12:01:11 -04:00
parent 346b7c0cfa
commit 0b1dba2be7
4 changed files with 66 additions and 481 deletions
-36
View File
@@ -50,10 +50,6 @@ automation:
entity_id: binary_sensor.cat_medication_tracker_all_cats_medicated
to: "on"
action:
- service: notify.notify
data:
title: "Cat meds done"
message: "Penelope and Tess have both been marked medicated today."
- service: notify.notify_events
data:
title: "Cat meds done"
@@ -77,14 +73,6 @@ automation:
cat_name: >
{% if trigger.id == 'penelope' %}Penelope
{% else %}Tess{% endif %}
- service: notify.mobile_app_joshuas_iphone_of_pain
data:
title: "Cat medication given"
message: "{{ cat_name }} has been marked medicated."
- service: notify.mobile_app_pollys_iphone
data:
title: "Cat medication given"
message: "{{ cat_name }} has been marked medicated."
- service: notify.notify_events
data:
title: "Cat medication given"
@@ -100,30 +88,6 @@ automation:
entity_id: binary_sensor.cat_medication_tracker_all_cats_medicated
state: "off"
action:
- service: notify.mobile_app_joshuas_iphone_of_pain
data:
title: "Cat meds still needed"
message: >
{% set ns = namespace(cats=[]) %}
{% if is_state('switch.cat_medication_tracker_penelope_medicated', 'off') %}
{% set ns.cats = ns.cats + ['Penelope'] %}
{% endif %}
{% if is_state('switch.cat_medication_tracker_tess_medicated', 'off') %}
{% set ns.cats = ns.cats + ['Tess'] %}
{% endif %}
{{ ns.cats | join(' and ') }} still need medication.
- service: notify.mobile_app_pollys_iphone
data:
title: "Cat meds still needed"
message: >
{% set ns = namespace(cats=[]) %}
{% if is_state('switch.cat_medication_tracker_penelope_medicated', 'off') %}
{% set ns.cats = ns.cats + ['Penelope'] %}
{% endif %}
{% if is_state('switch.cat_medication_tracker_tess_medicated', 'off') %}
{% set ns.cats = ns.cats + ['Tess'] %}
{% endif %}
{{ ns.cats | join(' and ') }} still need medication.
- service: notify.notify_events
data:
title: "Cat meds still needed"