Last active
April 24, 2023 03:23
-
-
Save Didgeridrew/ecab0fafb49c6f8cb4c4e4377af58ff0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trigger: | |
| - platform: event | |
| event_type: timer.finished | |
| event_data: | |
| entity_id: timer.pump | |
| condition: | |
| action: | |
| - variables: | |
| on_time: "00:15:00" | |
| off_time: "00:30:00" | |
| next_interval: > | |
| {{ on_time if is_state('switch.pump','off') else off_time }} | |
| - service: switch.toggle | |
| target: | |
| entity_id: switch.pump | |
| - service: timer.start | |
| data: | |
| duration: "{{ next_interval }}" | |
| target: | |
| entity_id: timer.pump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment