I’ve got a utility meter that helps me track water leaking into a small bucket. Since the bucket is limited in size I want to be notified when there’s more than 500ml in the bucket, so I can empty it. To this purpose I’ve created a utility meter that tracks the amount of water per month (since I empty the bucket once per month either way):
alias: Notify - Water Lekkage Bak
description: Water Bak Legen!
trigger:
- platform: numeric_state
entity_id: sensor.water_lekkage_monthly
above: 500
- platform: numeric_state
entity_id: sensor.water_lekkage_monthly
above: 1000
- platform: numeric_state
entity_id: sensor.water_lekkage_monthly
above: 1500
- platform: numeric_state
entity_id: sensor.water_lekkage_monthly
above: 2000
- platform: numeric_state
entity_id: sensor.water_lekkage_monthly
above: 2500
condition:
- alias: Home Assistant has been running > 5 mins
condition: template
value_template: "{{ as_timestamp(now()) - as_timestamp(states('sensor.uptime')) > 300 }}"
action:
- service: notify.mobile_phones
data:
title: "Water Lekkage: bakje legen!"
message: >-
Er is meer dan 500ml water gemeten door de water lekkage sensor. Zet de
sensor uit en leeg de bak!
- service: persistent_notification.create
data:
message: >-
Er is meer dan 500ml water gemeten door de water lekkage sensor. Zet de
sensor uit en leeg de bak!
title: "Water Lekkage: bakje legen!"
mode: single
1st question: is there a more efficient way to trigger each 500ml?
2nd question: I’ve incorporated a condition to avoid the automation to execute after a restart. Is there a way to also avoid execution after a quick reload?