Skip to content

Commit

Permalink
Create automate watering season
Browse files Browse the repository at this point in the history
  • Loading branch information
petergridge authored Dec 25, 2024
1 parent 5e7d823 commit 5c93bcf
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions automate watering season
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
I have had a play and found this works.

1. Create a local calendar, https://www.home-assistant.io/integrations/calendar, I named mine 'local'
2. Add the 'Watering Season' entry with the desired start and end dates, using the calendar link in the sidebar
3. For testing, the calendar does not refresh immediately so set the start at least 15 minutes into the future.
4. Check that the 'enable_program' switch name is consistent with your implementation
```
alias: Calendar
description: ""
triggers:
- trigger: calendar
entity_id: calendar.local
event: start
offset: "0:0:0"
- trigger: calendar
entity_id: calendar.local
event: end
offset: "0:0:0"
mode: parallel
max: 10
conditions:
- condition: template
value_template: "{{ 'Watering Season' in trigger.calendar_event.summary }}"
actions:
- if:
- condition: template
value_template: "{{ trigger.event == 'start' }}"
then:
- data: {}
target:
entity_id: switch.enable_program
action: switch.turn_on
- action: notify.persistent_notification
metadata: {}
data:
message: Watering Season started
else:
- data: {}
target:
entity_id: switch.enable_program
action: switch.turn_off
- action: notify.persistent_notification
metadata: {}
data:
message: Watering Season ended
```

0 comments on commit 5c93bcf

Please sign in to comment.