Alerting when things go offline

I was wondering if there was also an automation / script available for when things go offline

Every now and then my garden goes offline (gardener with a waterhose …) which means all the sensors and devices go offline as well… as an action I want to create:
If XXX and XXX and XXX go offline → send message

any idea how to achieve this?

maybe you could provide some more details, set up being used, devices being used, what protocol is being used, when would you like to define that something is offline (within milisecond, or an hour?)

Its two Sonoff switches, a Velbus temperature sensor, water sensor (sonoff again), a Velbus wall module…

and if they are offline for like 1hr that should be good enough… usually (certainly the Velbus stuff) stays online 24/7 without downtime

1 Like

Here’s a basic example:

mode: queued
triggers:
  - trigger: state
    entity_id:
      - switch.garden_1
      - switch.garden_2
      - sensor.water
      - sensor.temperature
    to:
      - unavailable
    for:
      hours: 1
actions:
  - action: notify.mobile_app_your_phone
    data:
      message: "{{ trigger.to_state.name }} is unavailable"
2 Likes