Hi, I am struggling to get my automation work. Added yaml should be self-explanatory.
Mode is restart so it should - how I understand it run. Obviously it does not. The triggers seem to OK because when I run it manually it does what it should but then stops. So it starts watering but never stops until I run it manually.
thanks
alias: watering
description: Controls watering based on soil moisture level and sunlight.
triggers:
- entity_id:
- sun.sun
to: above_horizon
trigger: state
- value_template: >-
{{ states('sensor.esphome_web_80b8d4_humid')|float <
states('input_number.humid')|float }}
for:
minutes: 15
trigger: template
- trigger: homeassistant
event: start
conditions:
- condition: state
entity_id: sun.sun
state: above_horizon
actions:
- choose:
- conditions:
- condition: template
value_template: >-
{{ states('sensor.esphome_web_80b8d4_humid')|float <
states('input_number.humid')|float }}
sequence:
- target:
entity_id: switch.watering
action: switch.turn_on
data: {}
- conditions:
- condition: template
value_template: >-
{{ states('sensor.esphome_web_80b8d4_humid')|float >
states('input_number.humid')|float + 5 }}
sequence:
- action: switch.turn_off
target:
entity_id: switch.watering
data: {}
mode: restart