Add PlantMonitor_bp.yaml

This commit is contained in:
2025-11-08 21:51:56 -05:00
parent 21393a23f8
commit 2ba75fa309

60
PlantMonitor_bp.yaml Normal file
View File

@@ -0,0 +1,60 @@
blueprint:
name: 💧 DWC Plant Tracker
description: >
Track plants in Deep Water Culture (DWC) or soil setups.
Notifies you to change or add water every 7 days.
domain: automation
input:
plant_name:
name: Plant Name
description: Friendly name of your plant (e.g. "Lettuce 1").
default: "My Plant"
last_watered_helper:
name: Last Watered Helper
description: >
Select the Date/Time helper for when this plant was last watered.
selector:
entity:
domain: input_datetime
notification_target:
name: Notification Target
description: >
Choose how to receive reminders (e.g. mobile app, persistent_notification, etc.)
selector:
target:
# Trigger every day at midnight to check age
trigger:
- platform: time
at: "00:00:00"
variables:
plant_name: !input plant_name
last_watered_entity: !input last_watered_helper
# Conditions check if plant hasn't been watered in 7+ days
condition:
- condition: template
value_template: >
{% set last = states(last_watered_entity) %}
{% if last not in ['unknown', 'unavailable', None] %}
{{ ((as_timestamp(now()) - as_timestamp(last)) / 86400) | int >= 7 }}
{% else %}
false
{% endif %}
action:
- variables:
days_since: >
{% set last = states(last_watered_entity) %}
{% if last not in ['unknown','unavailable',None] %}
{{ ((as_timestamp(now()) - as_timestamp(last)) / 86400) | int }}
{% else %} 0 {% endif %}
- service: notify
target: !input notification_target
data:
title: "💧 DWC Water Change Reminder"
message: "{{ plant_name }} needs a water change! Its been {{ days_since }} days since last watering."
mode: single