forked from petergridge/Irrigation-V5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testhelpers.yaml
99 lines (93 loc) · 2.74 KB
/
testhelpers.yaml
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
# create helpers to support testing the irrigation custom control.
# supports creating 3 zones with all attributes configured
switch:
- platform: template
switches:
dummy_1:
friendly_name: Zone 1
value_template: "{{ is_state('input_boolean.dummy_switch_1', 'on') }}"
turn_on:
- delay: '00:00:00'
- service: input_boolean.turn_on
entity_id: input_boolean.dummy_switch_1
turn_off:
- delay: '00:00:00'
- service: input_boolean.turn_off
entity_id: input_boolean.dummy_switch_1
dummy_2:
friendly_name: Zone 2
value_template: "{{ is_state('input_boolean.dummy_switch_2', 'on') }}"
turn_on:
- delay: '00:00:00'
- service: input_boolean.turn_on
entity_id: input_boolean.dummy_switch_2
turn_off:
- delay: '00:00:00'
- service: input_boolean.turn_off
entity_id: input_boolean.dummy_switch_2
dummy_3:
friendly_name: Zone 3
value_template: "{{ is_state('input_boolean.dummy_switch_3', 'on') }}"
turn_on:
- service: input_boolean.turn_on
entity_id: input_boolean.dummy_switch_3
turn_off:
- service: input_boolean.turn_off
entity_id: input_boolean.dummy_switch_3
dummy_pump:
friendly_name: Pump
value_template: "{{ is_state('input_boolean.dummy_pump', 'on') }}"
turn_on:
- service: input_boolean.turn_on
entity_id: input_boolean.dummy_pump
turn_off:
- service: input_boolean.turn_off
entity_id: input_boolean.dummy_pump
input_boolean:
dummy_switch_1:
dummy_switch_2:
dummy_switch_3:
rain:
icon: mdi:weather-pouring
name: rain
dummy_pump:
icon: mdi:pump
name: pump
well:
icon: mdi:water-well-outline
name: well
controller:
icon: mdi:alarm-panel
name: controller
template:
- binary_sensor:
- name: Rain
state: "{{ is_state('input_boolean.rain','on') }}"
icon: mdi:weather-pouring
- name: Well
state: "{{ is_state('input_boolean.well','on') }}"
icon: mdi:water-well-outline
- name: Controller
state: "{{ is_state('input_boolean.controller','on') }}"
icon: mdi:alarm-panel
- sensor:
- name: Adjustment
state: "{{ states('input_number.adjustment') }}"
icon: mdi:knob
- sensor:
- name: Flow Sensor
state: "{{ states('input_number.flow_sensor') }}"
icon: mdi:waves-arrow-right
input_number:
flow_sensor:
name: 'Flow Sensor'
min: 0
max: 20
step: 1
icon: mdi:waves-arrow-right
unit_of_measurement: 'L/min'
adjustment:
min: 0
max: 2
step: .1
icon: mdi:knob