-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathExample.yaml
More file actions
196 lines (191 loc) · 7.26 KB
/
Example.yaml
File metadata and controls
196 lines (191 loc) · 7.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
title: Irrigation
views:
- title: Irrigation
cards:
- type: vertical-stack
cards:
- type: markdown
content: '## Irrigation Schedules'
- square: true
type: grid
columns: 2
cards:
- show_name: true
show_icon: true
type: button
entity: switch.rachio_yard_schedule_watering
icon: mdi:sprinkler
name: Entire Yard
- show_name: true
show_icon: true
type: button
entity: switch.rachio_backyard_schedule_watering
name: Backyard
icon: mdi:sprinkler
- show_name: true
show_icon: true
type: button
entity: switch.rachio_frontyard_schedule_watering
name: Front Yard
icon: mdi:sprinkler
- show_name: true
show_icon: true
type: button
entity: switch.rachio_roses_schedule_watering
name: Roses
icon: mdi:sprinkler
- type: vertical-stack
cards:
- type: markdown
content: '## System Status'
- type: entities
entities:
- entity: sensor.rachio_device_status
name: System Status
- type: markdown
content: >
### Active Irrigation {% set active = namespace(schedules=[], zones=[]) %}
{% for entity in states.switch if entity.state == 'on' and 'rachio' in entity.entity_id and '_watering' in entity.entity_id %}
{% if 'schedule' in entity.entity_id %}
{% set friendly_name = entity.attributes.friendly_name | default(entity.entity_id) | string %}
{% set active.schedules = active.schedules + [friendly_name] %}
{% else %}
{% set friendly_name = entity.attributes.friendly_name | default(entity.entity_id) | string %}
{% set active.zones = active.zones + [friendly_name] %}
{% endif %}
{% endfor %}
{% if active.schedules|length > 0 or active.zones|length > 0 %}
{% if active.schedules|length > 0 %}
**Schedules:**
{% for schedule in active.schedules %}
* {{ schedule }}
{% endfor %}
{% endif %}
{% if active.zones|length > 0 %}
**Zones:**
{% for zone in active.zones %}
* {{ zone }}
{% endfor %}
{% endif %}
{% else %}
*No irrigation currently active*
{% endif %}
- type: entities
title: Last Run Times
show_header_toggle: false
entities:
- entity: sensor.rachio_next_to_garage_last_watered
- entity: sensor.rachio_back_of_garage_last_watered
- entity: sensor.rachio_shed_last_watered
- entity: sensor.rachio_back_fence_last_watered
- entity: sensor.rachio_back_ac_last_watered
- entity: sensor.rachio_front_ash_tree_last_watered
- entity: sensor.rachio_front_myrtle_last_watered
- entity: sensor.rachio_front_driveway_last_watered
- entity: sensor.rachio_bush_drip_last_watered
- entity: sensor.rachio_rose_drip_last_watered
- type: vertical-stack
cards:
- type: markdown
content: '## Irrigation Zones'
- type: grid
columns: 4
cards:
- type: button
entity: switch.rachio_next_to_garage_watering
name: Side Garage
icon: mdi:sprinkler
- type: button
entity: switch.rachio_back_of_garage_watering
name: Back Garage
icon: mdi:sprinkler
- type: button
entity: switch.rachio_shed_watering
name: Shed Area
icon: mdi:sprinkler
- type: button
entity: switch.rachio_back_fence_watering
name: Back Fence
icon: mdi:sprinkler
- show_name: true
show_icon: true
type: button
entity: switch.rachio_back_ac_watering
name: Back AC
icon: mdi:sprinkler
- type: button
entity: switch.rachio_front_ash_tree_watering
name: Front Ash
icon: mdi:tree
- type: button
entity: switch.rachio_front_myrtle_watering
name: Front Myrtle
icon: mdi:flower
- type: button
entity: switch.rachio_front_driveway_watering
name: Driveway
icon: mdi:sprinkler
- type: button
entity: switch.rachio_bush_drip_watering
name: Bush Drip
icon: mdi:water-pump
- type: button
entity: switch.rachio_rose_drip_watering
name: Rose Drip
icon: mdi:flower-tulip
# Example automation to automatically disable programs during winter
automation:
- alias: "Disable winter watering programs"
trigger:
- platform: time
at: "00:00:00"
condition:
- condition: template
value_template: "{{ now().month in [11, 12, 1, 2] }}" # Nov-Feb
action:
- service: rachio_local.disable_program
data:
program_id: sensor.smart_hose_timer_program_morning_watering
- service: rachio_local.disable_program
data:
program_id: sensor.smart_hose_timer_program_evening_watering
- alias: "Enable spring watering programs"
trigger:
- platform: time
at: "00:00:00"
condition:
- condition: template
value_template: "{{ now().month == 3 and now().day == 1 }}" # March 1st
action:
- service: rachio_local.enable_program
data:
program_id: sensor.smart_hose_timer_program_morning_watering
- service: rachio_local.enable_program
data:
program_id: sensor.smart_hose_timer_program_evening_watering
- alias: "Update program for hot weather"
trigger:
- platform: numeric_state
entity_id: sensor.outdoor_temperature
above: 95
action:
- service: rachio_local.update_program
data:
program_id: sensor.smart_hose_timer_program_morning_watering
rain_skip_enabled: false # Don't skip during heat wave
# Example button card for program control
type: vertical-stack
cards:
- type: markdown
content: "## Smart Hose Timer Programs"
- type: entities
entities:
- entity: sensor.smart_hose_timer_program_morning_watering
type: custom:button-card
tap_action:
action: call-service
service: rachio_local.update_program
service_data:
program_id: sensor.smart_hose_timer_program_morning_watering
enabled: "{{ not is_state('sensor.smart_hose_timer_program_morning_watering', 'disabled') }}"
name: Toggle Morning Program