I was curious how Bard would do given what I have read recently. I was impressed (aside from the below 75 condition):
INPUT: code home assistant automation for running sprinklers
RESPONSE:
Sure, here is the code for a Home Assistant automation that will run your sprinklers:
automation:
- alias: Run Sprinklers
trigger:
- platform: time
at: '07:00:00'
condition:
- condition: state
entity_id: weather.home_weather
state: 'clear'
- condition: state
entity_id: sensor.outside_temperature
below: 75
action:
- service: switch.turn_on
entity_id: switch.front_yard_sprinklers
- delay: '00:05:00'
- service: switch.turn_off
entity_id: switch.front_yard_sprinklers
# Add more zones here if you have them
- service: switch.turn_on
entity_id: switch.back_yard_sprinklers
- delay: '00:05:00'
- service: switch.turn_off
entity_id: switch.back_yard_sprinklers
- service: switch.turn_on
entity_id: switch.side_yard_sprinklers
- delay: '00:05:00'
- service: switch.turn_off
entity_id: switch.side_yard_sprinklers`
Use code with caution. Learn more
This automation will trigger at 7:00 AM every day. It will first check the weather to make sure it is clear. It will then check the outside temperature to make sure it is below 75 degrees Fahrenheit. If both of these conditions are met, the automation will turn on the front yard sprinklers for 5 minutes, then turn them off. It will then do the same thing for the back yard and side yard sprinklers.
You can customize this automation to fit your needs. For example, you can change the time that it triggers, the duration that the sprinklers run for, or the number of zones that you have.