Closed northpower25 closed 4 years ago
Target: Watering the lawn based on the current soil moisture and time of day. With the aim that the lawn is watered sufficiently but is not too wet.
Why not with the Gardena App: The problem of Gardena automation for lawn irrigation is that this ...
Requirements
Automation example:
alias: Bewässerung Garten
trigger:
platform: time_pattern
minutes: '/15'
seconds: 0
condition:
condition: and
conditions:
- condition: state
entity_id: timer.gartenbewaesserung
state: 'idle'
- condition: numeric_state
entity_id: sensor.garten_sensor_light_intensity
below: 10
- condition: numeric_state
entity_id: sensor.beet_sensor_light_intensity
below: 10
- condition: numeric_state
entity_id: sensor.garten_sensor_ambient_temperature
above: 5
- condition: numeric_state
entity_id: sensor.garten_sensor_soil_humidity
below: 10
action:
- service: timer.start
entity_id: timer.gartenbewaesserung
- service: switch.turn_on
entity_id: switch.garten_water_control
- delay: 0:12:00
- service: switch.turn_off
entity_id: switch.garten_water_control
- delay: 0:60:00
- service: switch.turn_on
entity_id: switch.garten_water_control
- delay: 0:24:00
- service: switch.turn_off
entity_id: switch.garten_water_control
- delay: 0:60:00
- service: switch.turn_on
entity_id: switch.garten_water_control
- delay: 0:24:00
- service: switch.turn_off
Target: Notification over HomeAssistant Companion App or as Telegram Messenger message or over Amazon Alexa with the help of Alexa Media Player Integration
Why not with the Gardena App: It is not possible to get Messages from the status of the smart water or the sensor devices.
It is not possible to get this notifications over Amazon Alexa from the App
Requirements
Configuration: only needed for Telegram
**Automation example:**
```- alias: "Benachrichtigung Bewässerung Garten an"
trigger:
platform: state
entity_id: switch.garten_water_control
to: 'on'
action:
- service: notify.notify
data:
title: "Bewässerung Garten"
message: "Bewässerung im Garten wurde gestartet"
- service: notify.alexa_media
data:
data:
type: announce
target:
- media_player.radio_wohnzimmer
message: "Die Bewässerung im Garten wurde gestartet. Die Feuchtigkeit beträgt aktuell {{ states.sensor.garten_sensor_humidity.state }}% die Temperatur liegt bei {{ states.sensor.garten_sensor_temperature.state }}°C"
- service: notify.telegram_[you Telegram channel]
data_template:
title: '*Bewässerung Garten gestartet!*'
message: "Die Bewässerung im Garten wurde gestartet. Die Feuchtigkeit beträgt aktuell {{ states.sensor.garten_sensor_humidity.state }}% die Temperatur liegt bei {{ states.sensor.garten_sensor_temperature.state }}°C -> https://[public HA URL]/lovelace/terrasse"
data:
inline_keyboard:
- 'Bewässerung beenden:/stopbewaesserunggarten'
- ' Für 3 Stunden stoppen:/stopbewaesserunggarten3h, Für 24 Stunden stoppen:/stopbewaesserunggarten24h'
- id: 'telegram_stop_bewaesserung_garten'
alias: 'Telegram Bewässerung Garten stoppen'
trigger:
platform: event
event_type: telegram_callback
event_data:
data: '/stopbewaesserunggarten'
action:
- service: telegram_bot.answer_callback_query
data_template:
callback_query_id: '{{ trigger.event.data.id }}'
message: 'OK, ich beende die Bewässerung im Garten'
- service: switch.turn_off
entity_id: switch.garten_water_control
- service: notify.telegram_[you Telegram channel]
data_template:
title: '*Bewässerung Garten!*'
message: "Bewässerung im Garten gestoppt https://[public HA URL]/lovelace/terrasse"
- id: 'telegram_stop_bewaesserung_garten_3h'
alias: 'Telegram Bewässerung 3h stoppen'
trigger:
platform: event
event_type: telegram_callback
event_data:
data: '/stopbewaesserunggarten3h'
action:
- service: telegram_bot.answer_callback_query
data_template:
callback_query_id: '{{ trigger.event.data.id }}'
message: 'OK, unterbreche die Bewässerung für 3 Stunden'
- service: automation.turn_off
entity_id: automation.bewasserung_garten
- service: notify.telegram_[you Telegram channel]
data_template:
title: '*Bewässerung Garten!*'
message: "Bewässerung im Garten für 3 Stunden unterbrochen https://[public HA URL]/lovelace/terrasse"
- delay: '03:00:00'
- service: automation.turn_on
entity_id: automation.bewasserung_garten
- service: notify.telegram_[you Telegram channel]
data_template:
title: '*Bewässerung Garten!*'
message: "Automatisierung für Bewässerung im Garten wurde nach 3 Stunden wieder gestartet https://[public HA URL]/lovelace/terrasse"
- id: 'telegram_stop_bewaesserung_garten_24h'
alias: 'Telegram Bewässerung 24h stoppen'
trigger:
platform: event
event_type: telegram_callback
event_data:
data: '/stopbewaesserunggarten24h'
action:
- service: telegram_bot.answer_callback_query
data_template:
callback_query_id: '{{ trigger.event.data.id }}'
message: 'OK, unterbreche die Bewässerung für 24 Stunden'
- service: automation.turn_off
entity_id: automation.bewasserung_garten
- service: notify.telegram_[you Telegram channel]
data_template:
title: '*Bewässerung Garten!*'
message: "Bewässerung im Garten für 24 Stunden unterbrochen https://[public HA URL]/lovelace/terrasse"
- delay: '24:00:00'
- service: automation.turn_on
entity_id: automation.bewasserung_garten
- service: notify.telegram_[you Telegram channel]
data_template:
title: '*Bewässerung Garten!*'
message: "Automatisierung für Bewässerung im Garten wurde nach 24 Stunden wieder gestartet https://[public HA URL]/lovelace/terrasse"
- alias: "Benachrichtigung Bewässerung Garten aus"
trigger:
platform: state
entity_id: switch.garten_water_control
to: 'off'
action:
- service: notify.notify
data:
title: "Bewässerung Garten"
message: "Bewässerung im Garten wurde beendet"
- service: notify.alexa_media
data:
data:
type: announce
target:
- media_player.radio_wohnzimmer
message: ""Die Bewässerung im Garten wurde beendet. Die Feuchtigkeit beträgt jetzt {{ states.sensor.garten_sensor_humidity.state }}%"
- service: notify.telegram_[you Telegram channel]
data_template:
title: '*Bewässerung Garten beendet!*'
message: "Die Bewässerung im Garten wurde beendet. Die Feuchtigkeit beträgt jetzt {{ states.sensor.garten_sensor_humidity.state }}% -> https://[public HA URL]/lovelace/terrasse"
Hello Northpower,
Thx, this is a very good initiative ! I think it deserves a RECIPE.md. Would you mind to create a PR with them ?
And also, sorry for that, but I don't speak german at all, would you mind translate them in english at the same time so most of the people can take advantage of it ?
Thx again, Jérémie
Thx for the compliment! Yes i will do this both tomorow!
@grm see here -> #31 i hope i make no typos on the the translation 🙈
This has been added to a RECIPE.md
Thanks @northpower25
I think it helps all (specialy new users) if we collect and discus automations (here for irrigation controll) and rerequisits for those. For mowing we discuss this here -> #32