1
0

Moisture warning for plants

This commit is contained in:
Przemek Grondek 2024-08-22 22:23:02 +02:00
parent 374d143164
commit ee242e5811
6 changed files with 43 additions and 0 deletions

View File

@ -10,6 +10,7 @@
- vars/availability.yml
- vars/shopping-list.yml
- vars/lights-automations.yml
- vars/plants.yml
pre_tasks:
- import_tasks: tasks/clean.yml

View File

@ -412,6 +412,15 @@ plant:
battery: sensor.citrus_sensor_battery
min_moisture: 30
max_moisture: 50
calamondin:
sensors:
temperature: sensor.calamondin_temperature
moisture: sensor.calamondin_moisture
brightness: sensor.calamondin_illuminance
conductivity: sensor.calamondin_conductivity
battery: sensor.calamondin_battery
min_moisture: 30
max_moisture: 50
coffee:
sensors:
temperature: sensor.coffee_plant_sensor_temperature

View File

@ -104,6 +104,7 @@ good_morning:
icon: mdi:weather-sunny
sequence:
- service: script.check_unavailable
- service: script.water_plants_check
- service: script.alarm_disarm
- service: input_select.select_option
data:
@ -241,6 +242,7 @@ arrive_home:
icon: mdi:home-import-outline
sequence:
- service: script.alarm_disarm
- service: script.water_plants_check
- service: input_select.select_option
data:
option: Day

View File

@ -11,3 +11,9 @@
template:
src: 'alarm.yaml.j2'
dest: './build/scripts/alarm.yaml'
- name: Build plants script
delegate_to: localhost
template:
src: 'water-plants-check.yaml.j2'
dest: './build/scripts/water-plants-check.yaml'

View File

@ -0,0 +1,15 @@
water_plants_check:
alias: '[Info] check water plants'
sequence:
{% for plant in plants %}
- choose:
- conditions:
- condition: numeric_state
entity_id: {{ plant.entity_id }}
attribute: moisture
below: {{ plant.min_humidity }}
sequence:
- action: notify.mobile_app_iphone
data:
message: {{ plant.name }} moisture below {{ plant.min_humidity }}%, water plant
{% endfor %}

10
vars/plants.yml Normal file
View File

@ -0,0 +1,10 @@
plants:
- name: Citrus
entity_id: plant.citrus
min_humidity: 30
- name: Calamondin
entity_id: plant.calamondin
min_humidity: 30
- name: Coffee
entity_id: plant.coffee
min_humidity: 30