From 8b4930a91c1e52c36e9a3073a71301fb30afb73b Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Thu, 21 Apr 2022 22:04:25 +0200 Subject: [PATCH] Add notification to water plants --- configuration/automations/info-plants.yaml | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 configuration/automations/info-plants.yaml diff --git a/configuration/automations/info-plants.yaml b/configuration/automations/info-plants.yaml new file mode 100644 index 0000000..7de76fd --- /dev/null +++ b/configuration/automations/info-plants.yaml @@ -0,0 +1,48 @@ +- id: info-plants + alias: '[Info] Water plants' + mode: single + trigger: + - platform: numeric_state + entity_id: sensor.ble_moisture_living_room_plant + below: '20' + - platform: numeric_state + entity_id: sensor.ble_moisture_living_room_plant + below: '15' + - platform: numeric_state + entity_id: sensor.ble_moisture_living_room_plant + below: '10' + - platform: numeric_state + entity_id: sensor.ble_moisture_living_room_plant + below: '5' + + - platform: numeric_state + entity_id: sensor.ble_moisture_living_room_plant_2 + below: '20' + - platform: numeric_state + entity_id: sensor.ble_moisture_living_room_plant_2 + below: '15' + - platform: numeric_state + entity_id: sensor.ble_moisture_living_room_plant_2 + below: '10' + - platform: numeric_state + entity_id: sensor.ble_moisture_living_room_plant_2 + below: '5' + + - platform: numeric_state + entity_id: sensor.ble_moisture_thuja_plant_3 + below: '20' + - platform: numeric_state + entity_id: sensor.ble_moisture_thuja_plant_3 + below: '15' + - platform: numeric_state + entity_id: sensor.ble_moisture_thuja_plant_3 + below: '10' + - platform: numeric_state + entity_id: sensor.ble_moisture_thuja_plant_3 + below: '5' + action: + - service: notify.mobile_app_iphone_pg + data: + title: Water plants + message: > + {{ state_attr(trigger.entity_id, 'friendly_name') }} has moisture {{ states(trigger.entity_id) }} %