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"
-21
View File
@@ -200,10 +200,6 @@ automation:
- action: timer.start
target:
entity_id: timer.litter_box_cat_cooldown
- action: notify.mobile_app_joshuas_iphone_of_pain
data:
message: "🐱 A cat is using the litter box right now!"
title: "Litter Box Activity"
- action: notify.notify_events
data:
message: "🐱 A cat is using the litter box right now!"
@@ -243,19 +239,6 @@ automation:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.litter_box_stuck_notified
- action: notify.mobile_app_joshuas_iphone_of_pain
data:
message: "⚠️ The litter box is STUCK ROTATED CLOSED! Visual state is 'closed' — check the mechanism."
title: "Litter Box STUCK CLOSED!"
- action: notify.mobile_app_pollys_iphone
data:
message: "⚠️ The litter box is STUCK ROTATED CLOSED! Visual state is 'closed' — check the mechanism."
title: "Litter Box STUCK CLOSED!"
- action: notify.mailgun_smtp
data:
message: "The litter box camera detects the box in a rotated/closed position. The mechanism may be stuck mid-cycle."
title: "Litter Box Stuck Closed!"
target: "joshua@cnjmail.com"
- action: notify.notify_events
data:
message: "⚠️ The litter box is STUCK ROTATED CLOSED! Visual state is 'closed' — check the mechanism."
@@ -302,10 +285,6 @@ automation:
- action: timer.start
target:
entity_id: timer.litter_box_scoop_cooldown
- action: notify.mobile_app_joshuas_iphone_of_pain
data:
message: "🧹 The litter box could use a scoop! Cleanliness: {{ states('sensor.litter_box_camera_cleanliness_score') }}%"
title: "Litter Box Needs Scooping"
- action: notify.notify_events
data:
message: "🧹 The litter box could use a scoop! Cleanliness: {{ states('sensor.litter_box_camera_cleanliness_score') }}%"