Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 103058

Trigger script for irrigation at sunset and sunrise

$
0
0

I’ve got the following automation, which checks for a rainy day in 48h (found somewhere on this forum a while ago). No i want to trigger my script at sunrise and sunset and water my garden for 10min if no rain is forecasted and the min forecasted temperature is 4 degrees celcius.

Somehow my script is only triggered once, but not every sunset/sunrise. What am i doing wrong?

id: '1651254951626'
alias: Sunset
description: ''
trigger:
  - platform: sun
    event: sunset
    offset: '0'
  - platform: sun
    event: sunset
    offset: '0'
condition:
  - condition: state
    entity_id: sensor.rainy_day
    state: 'false'
  - condition: numeric_state
    entity_id: sensor.openweathermap_forecast_temperature
    above: '4'
action:
  - service: notify.mobile_app_mi_10_pro
    data:
      message: Watering the garden.
      title: Irrigation
  - type: turn_on
    device_id: 654fa17ab828213bc94c87a7f4d4c6f1
    entity_id: switch.irrigation_pump
    domain: switch
  - delay:
      hours: 0
      minutes: 10
      seconds: 0
      milliseconds: 0
  - type: turn_off
    device_id: 654fa17ab828213bc94c87a7f4d4c6f1
    entity_id: switch.irrigation_pump
    domain: switch
mode: restart

Best regads

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 103058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>