forked from nliaudat/floor-heating-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script_termostat_check.yaml
109 lines (98 loc) · 4.58 KB
/
script_termostat_check.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
100
101
102
103
104
105
106
107
108
109
script:
- id: TH1_check
then:
- lambda: |-
if (abs(id(CH1_cover).position < id(min_movement).state/100 )) {
{auto call = id(CH1_cover).make_call();
call.set_position(id(min_movement).state/100 + 0.01);
call.perform();
ESP_LOGD("main", "Adjustment done for CH1 set to position close %3f", id(CH1_cover).position);}
{auto call = id(CH1_cover).make_call();
call.set_command_close();
call.perform();
ESP_LOGD("main", "Adjustment done for CH1 set to position close");}
};
- id: TH2_check
then:
- lambda: |-
if (abs(id(CH2_cover).position < id(min_movement).state/100 )) {
{auto call = id(CH2_cover).make_call();
call.set_position(id(min_movement).state/100 + 0.01);
call.perform();}
{auto call = id(CH2_cover).make_call();
call.set_command_close();
call.perform();
ESP_LOGD("main", "Adjustment done for CH2 set to position close");}
};
- id: TH3_check
then:
- lambda: |-
if (abs(id(CH3_cover).position < id(min_movement).state/100 )) {
{auto call = id(CH3_cover).make_call();
call.set_position(id(min_movement).state/100 + 0.01);
call.perform();}
{auto call = id(CH3_cover).make_call();
call.set_command_close();
call.perform();
ESP_LOGD("main", "Adjustment done for CH3 set to position close");}
};
- id: TH4_check
then:
- lambda: |-
if (abs(id(CH4_cover).position < id(min_movement).state/100 )) {
{auto call = id(CH4_cover).make_call();
call.set_position(id(min_movement).state/100 + 0.01);
call.perform();}
{auto call = id(CH4_cover).make_call();
call.set_command_close();
call.perform();
ESP_LOGD("main", "Adjustment done for CH4 set to position close");}
};
- id: TH5_check
then:
- lambda: |-
if (abs(id(CH5_cover).position < id(min_movement).state/100 )) {
{auto call = id(CH5_cover).make_call();
call.set_position(id(min_movement).state/100 + 0.01);
call.perform();}
{auto call = id(CH5_cover).make_call();
call.set_command_close();
call.perform();
ESP_LOGD("main", "Adjustment done for CH5 set to position close");}
};
- id: TH6_check
then:
- lambda: |-
if (abs(id(CH6_cover).position < id(min_movement).state/100 )) {
{auto call = id(CH6_cover).make_call();
call.set_position(id(min_movement).state/100 + 0.01);
call.perform();}
{auto call = id(CH6_cover).make_call();
call.set_command_close();
call.perform();
ESP_LOGD("main", "Adjustment done for CH6 set to position close");}
};
- id: TH7_check
then:
- lambda: |-
if (abs(id(CH7_cover).position < id(min_movement).state/100 )) {
{auto call = id(CH7_cover).make_call();
call.set_position(id(min_movement).state/100 + 0.01);
call.perform();}
{auto call = id(CH7_cover).make_call();
call.set_command_close();
call.perform();
ESP_LOGD("main", "Adjustment done for CH7 set to position close");}
};
- id: TH8_check
then:
- lambda: |-
if (abs(id(CH8_cover).position < id(min_movement).state/100 )) {
{auto call = id(CH8_cover).make_call();
call.set_position(id(min_movement).state/100 + 0.01);
call.perform();}
{auto call = id(CH8_cover).make_call();
call.set_command_close();
call.perform();
ESP_LOGD("main", "Adjustment done for CH8 set to position close");}
};