Aquarium Leak Sensor code not working

update: no longer getting errors, but still not getting the boolean to reset. here’s what I have

- id: 60g_sys_front_leak_sensor_notifs_auto_on
  alias: 60g Front Leak Sensor Auto Notifs
  trigger:
    platform: state
    entity_id:
      - binary_sensor.lumi_lumi_sensor_wleak_aq1_53c60508_ias_zone
    to: "off"
    for:
      seconds: 5
  condition:
    condition: state
    entity_id: input_boolean.60g_sys_leak_front_boolean
    state: "off"
  action:
    - service: input_boolean.turn_off
      target:
        entity_id: input_boolean.60g_sys_leak_front_boolean

appreciate any help!

Original/context:

Hey everyone,

just a warning before I start, I’m still pretty new to home assistant and programming in general, so excuse me if the problem is simple.

I’ve got a few aquariums in my house and want to set up some leak sensors that will send me “critical notifications” if they detect water. I have that figured out so far, but would also like it to repeat until I have acknowledged the notification. I tried having it repeat at specific time intervals until the sensor read as “dry” again, but realized I would not want to be bombarded with notification as I’m on my way home to check or calling up friends to help.

Is there a way I could have it repeat, say, every 30 seconds until I acknowledge it by opening the notification and home assistant?

Appreciate any help, thank you.

Just create a input boolean helper that you toggle to on.
Have this as the condition in your automation to send the notifications.
Just make sure the boolean is reset every night (or more often?).

Thanks for the reply, though im still trying to understand boolean helpers lol. Why would l need to reset it every night?

The boolean will block all leak notifications to be sent.
If you trust your ability to toggle the boolean back then it won’t be an issue.
But if you have any doubt then it should reset every night so that new notification can be sent tomorrow again.

Or as I said, reset it more often.
Say every two hours. That way if the one got a leak in the morning and another in the afternoon, both will send notifications.
Highly unlikely though.

1 Like

ohhh alright, thank you so much!

do you think it makes sense to have an automation that resets the boolean every time the sensor is dry again?

my thought process is that if I turn the boolean off and sort it all out, it should be dry again, and by having it automatically turn on the boolean, it begins monitoring it again?

Sound like a good idea, but I don’t have any experience of leak detectors