I’ve created two automations to notify me when my wifi or zigbee devices drop off the network. I’ve sucessfully made a group and automation for the wifi devices as they are all Shelly relays, and have the code here if anyone wants to use it.
After getting them both working, I set the wifi devices to only notify me if they’ve been off network for 5 minutes as they were generating a ton of notifications. However, all my zigbee devices are sensors, and I cant figure out out to get them to notify me without driving me nuts. I can’t figure out how to get a duration in the zigbee triggered automation. I’ve tried using “trigger.for” but it only generates errors and I can’t save the automation.
Does anyone have any advice to get make the zigbee side more palatable?
Working WiFi device notificationautomation:
alias: Shelly Drop Off Notification Array
description: ""
trigger:
- platform: state
entity_id:
- group.shelly
to: unavailable
for:
hours: 0
minutes: 5
seconds: 0
condition: []
action:
- service: notify.mobile_app_rawbeef
data:
title: Shelly Device Dropped Out
message: Check your shelly connections
- service: notify.persistent_notification
data:
message: Check your shelly connections
title: Shelly Device Dropped Out
mode: single
Nonfunctional Zigbee device notification automation:
alias: Zigbee Device Drop Out Notification
description: ""
trigger:
- device_id: fd7088679d047090c8988b4ec74ea78a
domain: zha
platform: device
type: device_offline
subtype: device_offline
- device_id: 5b9d61ff45272c6101d69146a61e267d
domain: zha
platform: device
type: device_offline
subtype: device_offline
- device_id: 0d9c38d9959c874b60ef4e33613376ab
domain: zha
platform: device
type: device_offline
subtype: device_offline
- device_id: d53640fbeda02fc4f13f2c3c48dcaf21
domain: zha
platform: device
type: device_offline
subtype: device_offline
- device_id: 02230461cb2f580672b62ee43991ad6d
domain: zha
platform: device
type: device_offline
subtype: device_offline
- device_id: b11878abbbed22169790e24b5fb4987b
domain: zha
platform: device
type: device_offline
subtype: device_offline
- device_id: eceb71b25ceb34a4c229bcebe851344b
domain: zha
platform: device
type: device_offline
subtype: device_offline
- device_id: ae580d133a0bed17db02a1ee6853d567
domain: zha
platform: device
type: device_offline
subtype: device_offline
- device_id: c9c342de994c430a230564701f200bcc
domain: zha
platform: device
type: device_offline
subtype: device_offline
condition: []
action:
- service: notify.mobile_app_pixel_3a
data:
message: Check your zigbee devices
title: Zigbee Device Dropped Out
- service: notify.persistent_notification
data:
message: Check your zigbee devices
title: Zigbee Device Dropped Out
mode: single