-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweather.kv
More file actions
194 lines (156 loc) · 4.68 KB
/
weather.kv
File metadata and controls
194 lines (156 loc) · 4.68 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
#:kivy 1.7.2
<OptionsScreen>:
BoxLayout:
orientation: 'vertical'
BoxLayout:
spacing: 10
padding: 10
size_hint: 1, 0.1
orientation: 'horizontal'
Button:
text: 'Power'
on_release: root.power_off()
Button:
text: 'Restart'
on_release: root.restart()
Label:
# Padding space
size_hint: 0.05, 1
text: ''
Label:
size_hint: None, 0.8
text: 'Wifi'
canvas.before:
Color:
rgb: root.wifi_color
Rectangle:
pos: self.pos
size: self.size
Label:
size_hint: None, 0.8
text: 'DHT22'
canvas.before:
Color:
rgb: root.DHT22_color
Rectangle:
pos: self.pos
size: self.size
Label:
size_hint: None, 0.8
text: 'Weather'
canvas.before:
Color:
rgb: root.wunderground_color
Rectangle:
pos: self.pos
size: self.size
Label:
size_hint: None, 0.8
text: 'LIFX'
canvas.before:
Color:
rgb: root.LIFX_color
Rectangle:
pos: self.pos
size: self.size
Label:
# Padding space
size_hint: 1, 0.025
text: ''
ScrollView:
size_hint: 0.9, 0.55
pos_hint: {'center_x': 0.5}
do_scroll: "true"
Label:
#font_name: 'data/fonts/DroidSansMono.ttf'
font_size: 14
color: 0.6, 0.6, 0.6, 1.0
size_hint_y: None
height: self.texture_size[1]
text_size: self.width, None
text: root.logger_history
Label:
# Padding space
size_hint: 1, 0.025
text: ''
GridLayout:
spacing: 10
padding: 10
size_hint: 1, 0.2
cols: 3
padding: 10
Label:
text: "Backlight timeout"
Slider:
min: 0
max: 7
step: 1
value: 4
on_value: root.backlight_timeout_change(self.value)
Label:
text: root.backlight_timeout_label
Label:
text: "Backlight brightness"
Slider:
min: 0
max: 255
value: 255
id: brightness_slider
on_value: root.backlight_brightness_change(self.value)
BoxLayout:
orientation: 'horizontal'
Label:
# Padding space
size_hint: 0.2, 1
text: ''
Button:
size_hint: 0.6, 1
text: "Back"
on_release:
root.manager.transition.direction = 'right'
root.manager.current = 'weather'
Label:
# Padding space
size_hint: 0.2, 1
text: ''
Label:
# Padding space
size_hint: 1, 0.05
text: ''
<LifxScreen>:
BoxLayout:
orientation: 'vertical'
Label:
size_hint: 1, 0.1
font_size: 20
text: "Lights"
GridLayout:
id: light_layout
cols: 3
size_hint: 1, 0.3
padding: 10, 10
Label:
size_hint: 1, 0.1
font_size: 20
text: "Rooms"
GridLayout:
id: group_layout
cols: 2
size_hint: 1, 0.3
padding: 10, 10
BoxLayout:
orientation: 'horizontal'
size_hint: 1, 0.2
padding: 20, 20
Label:
size_hint: 0.6, 1
Button:
id: refresh_button
size_hint: 0.2, 1
text: "Refresh"
Button:
size_hint: 0.2, 1
text: "Back"
on_release:
root.manager.transition.direction = 'left'
root.manager.current = 'weather'