Compare commits
2 Commits
f3da2c0352
...
ee242e5811
Author | SHA1 | Date | |
---|---|---|---|
ee242e5811 | |||
374d143164 |
@ -10,6 +10,7 @@
|
|||||||
- vars/availability.yml
|
- vars/availability.yml
|
||||||
- vars/shopping-list.yml
|
- vars/shopping-list.yml
|
||||||
- vars/lights-automations.yml
|
- vars/lights-automations.yml
|
||||||
|
- vars/plants.yml
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- import_tasks: tasks/clean.yml
|
- import_tasks: tasks/clean.yml
|
||||||
|
@ -412,6 +412,15 @@ plant:
|
|||||||
battery: sensor.citrus_sensor_battery
|
battery: sensor.citrus_sensor_battery
|
||||||
min_moisture: 30
|
min_moisture: 30
|
||||||
max_moisture: 50
|
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:
|
coffee:
|
||||||
sensors:
|
sensors:
|
||||||
temperature: sensor.coffee_plant_sensor_temperature
|
temperature: sensor.coffee_plant_sensor_temperature
|
||||||
|
@ -103,6 +103,8 @@ good_morning:
|
|||||||
mode: single
|
mode: single
|
||||||
icon: mdi:weather-sunny
|
icon: mdi:weather-sunny
|
||||||
sequence:
|
sequence:
|
||||||
|
- service: script.check_unavailable
|
||||||
|
- service: script.water_plants_check
|
||||||
- service: script.alarm_disarm
|
- service: script.alarm_disarm
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
data:
|
data:
|
||||||
@ -240,6 +242,7 @@ arrive_home:
|
|||||||
icon: mdi:home-import-outline
|
icon: mdi:home-import-outline
|
||||||
sequence:
|
sequence:
|
||||||
- service: script.alarm_disarm
|
- service: script.alarm_disarm
|
||||||
|
- service: script.water_plants_check
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
data:
|
data:
|
||||||
option: Day
|
option: Day
|
||||||
|
@ -11,3 +11,9 @@
|
|||||||
template:
|
template:
|
||||||
src: 'alarm.yaml.j2'
|
src: 'alarm.yaml.j2'
|
||||||
dest: './build/scripts/alarm.yaml'
|
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'
|
||||||
|
15
roles/scripts/templates/water-plants-check.yaml.j2
Normal file
15
roles/scripts/templates/water-plants-check.yaml.j2
Normal 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
10
vars/plants.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user