Home-Assistant-Tutorials
Home-Assistant-Tutorials copied to clipboard
example with more than one valve in the irrigation tuttorial
I have used you code for building the irrigation system. In your automation there is only one "switch". Tried adding more switches to that code, having the same
- delay: minutes: | {{ states("input_number.sprinkler_watering_duration") | int }}
part repeated in between the devices to switch. Since they need to start and stop one after an other. Not working, getting some error complaining about the sequence. So how to fit in additional switches (in my case some magnetic valves).
Tried again today and now it seems that this code is working. :) Still it might be a good idea having some samples in your instructions for different user cases.
`alias: "Sprinkler: Water the Garden" sequence:
- service: notify.mobile_app_iphone_from_will data: message: >- Start watering the garden for {{ states("input_number.sprinkler_watering_duration") | int }} minutes.
- type: turn_on device_id: 4883b1d1e6abcda0cb2fa405e6e4bef7 entity_id: 10be2608f1c0b0530b7d7bfeb6e05f07 domain: switch
- delay: minutes: | {{ states("input_number.sprinkler_watering_duration") | int }}
- type: turn_off device_id: 4883b1d1e6abcda0cb2fa405e6e4bef7 entity_id: 10be2608f1c0b0530b7d7bfeb6e05f07 domain: switch
- type: turn_on device_id: 4883b1d1e6abcda0cb2fa405e6e4bef7 entity_id: bdd88fc49bd59a70f805d35ff5150beb domain: switch
- delay: minutes: | {{ states("input_number.sprinkler_watering_duration") | int }}
- type: turn_off device_id: 4883b1d1e6abcda0cb2fa405e6e4bef7 entity_id: bdd88fc49bd59a70f805d35ff5150beb domain: switch
- service: script.sprinkler_reset_helper_values data: {}
- service: notify.mobile_app_iphone_from_will data: message: Stopped Watering the Garden mode: single icon: mdi:spri`
In addition to the instructions, some questions came up:
- which and where is manual input needed for running the system? So, duration watering duration is obvious, do we also need to fill in the max temperature?
- in the script Garden should be watered, there are 6 conditions. Is it needed to select one of them and gray the others out? Or are they all needed and is the scripting taking care of the selection?
`alias: 'Sprinkler: Check if Garden should be Watered'
description: ''
trigger:
- platform: sun event: sunrise offset: 0 condition: [] action:
- choose:
- conditions:`
well it seems I figured out the most of it. Only thing is still the part with the 6 conditions where it says, choose conditions! How to deal with that?