-
Notifications
You must be signed in to change notification settings - Fork 0
/
mypanel.yaml
2436 lines (2197 loc) · 64.1 KB
/
mypanel.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
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
substitutions:
lightbulb: "\U000F1802"
boiler_on: "\U000F0238"
boiler_off: "\U000F1722"
radiator: "\U000F0438"
ceiling_light: "\U000F0769"
house_temp: "\U000F0F55"
house_hum: "\U000F058E"
house_solar: "\U000F1A73"
house_solar2: "\U000F0A72"
house_valve: "\U000F1066"
house_co2: "\U000F07E4"
airco: "\U000F001B"
powerbutton: "\U000F0906"
groupbulb: "\U000F1253"
#weather icons
cloudy: "\U000F0590"
cloudyalert: "\U000F0F2F"
cloudyarrowright: "\U000F0E6E"
fog: "\U000F0591"
hail: "\U000F0592"
hazy: "\U000F0F30"
hurricane: "\U000F0898"
lightning: "\U000F0593"
lightningrainy: "\U000F067E"
night: "\U000F0594"
nightpartlycloudy: "\U000F0F31"
partlycloudy: "\U000F0595"
partlylightning: "\U000F0F32"
partlyrainy: "\U000F0F33"
partlysnowy: "\U000F0F34"
partlysnowyrainy: "\U000F0F35"
pouring: "\U000F0596"
rainy: "\U000F0597"
snowy: "\U000F0598"
snowyheavy: "\U000F0F36"
snowyrainy: "\U000F067F"
sunny: "\U000F0599"
sunnyalert: "\U000F0F37"
sunnyoff: "\U000F14E4"
sunset: "\U000F059A"
sunsetdown: "\U000F059B"
sunsetup: "\U000F059C"
tornado: "\U000F0F38"
windy: "\U000F059D"
windyvariant: "\U000F059E"
happyface: "\U000F01F5"
#airco
cool: "\U000F0717"
heat: "\U000F0510"
dry: "\U000F058E"
fan: "\U000F0210"
esphome:
name: woonkamerpanel
friendly_name: Guition Woonkamerpanel
platformio_options:
board_build.flash_mode: dio
on_boot:
then:
- delay: 5s
- lvgl.widget.hide: boot_screen
- delay: 10s
- if:
condition:
lambda: 'return id(night_mode);'
then:
# Backlight aanzetten bij opstart
- light.turn_on:
id: backlight
brightness: 75%
transition_length: 2s
# Schakel backlight na 30 seconden weer uit als het nacht is
- delay: 30s
- light.turn_off: backlight
esp32:
board: esp32-s3-devkitc-1
variant: esp32s3
flash_size: 16MB
framework:
type: esp-idf
sdkconfig_options:
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"
CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y
CONFIG_SPIRAM_RODATA: y
psram:
mode: octal
speed: 80MHz
logger:
# Enable Home Assistant API
api:
on_client_connected:
- if:
condition:
lambda: 'return (0 == client_info.find("Home Assistant "));'
then:
- lvgl.widget.show: lbl_hastatus
on_client_disconnected:
- if:
condition:
lambda: 'return (0 == client_info.find("Home Assistant "));'
then:
- lvgl.widget.hide: lbl_hastatus
ota:
- platform: esphome
password: "secret"
wifi:
networks:
- ssid: apname
password: secret
#use_address: 192.168.9.75
domain: .lan
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Ha-Panel-1 Fallback Hotspot"
password: secret
captive_portal:
web_server:
port: 80
button:
- platform: restart
name: reboot
sun:
latitude: 51.521159
longitude: 4.271538
id: my_sun
#-----------------------------------------------------------------------------------------------------------
# Content
#-------------------------------------------
lvgl:
displays:
- my_display
touchscreens:
- my_touchscreen
#-------------------------------------------
theme:
#label:
# text_font: roboto24 # set all your labels to use your custom defined font
button:
bg_color: 0x333333
#bg_grad_color: 0x333333
#bg_grad_dir: VER
text_font: roboto24
bg_opa: 85%
border_color: 0x333333
border_width: 0
text_color: 0xFFFFFF
pressed: # set some btn colors to be different in pressed state
bg_color: 0x111111
bg_grad_color: 0x111111
checked: # set some btn colors to be different in checked state
bg_color: 0x333333
bg_grad_color: 0x333333
text_color: 0xFFCB75
switch:
bg_color: 0xC0C0C0
bg_grad_color: 0xb0b0b0
bg_grad_dir: VER
bg_opa: COVER
checked:
bg_color: 0x1d5f96
bg_grad_color: 0x03324A
bg_grad_dir: VER
bg_opa: COVER
knob:
bg_color: 0xFFFFFF
bg_grad_color: 0xC0C0C0
bg_grad_dir: VER
bg_opa: COVER
slider:
border_width: 1
bg_color: 0x9c9c9c
indicator:
bg_color: 0x333333
bg_grad_color: 0x333333
bg_opa: COVER
knob:
bg_color: 0x444444
bg_grad_color: 0x444444
bg_opa: COVER
border_color: 0x444444
border_width: 1
text_color: 0xFFFFFF
#-------------------------------------------
style_definitions:
- id: header_footer
bg_color: 0x444444
bg_grad_color: 0x444444
bg_grad_dir: VER
bg_opa: COVER
border_width: 0
radius: 0
pad_all: 0
border_color: 0x333333
text_color: 0xFFFFFF
width: 100%
height: 40
#-------------------------------------------
top_layer:
widgets:
- label:
text: "\uF1EB"
id: lbl_hastatus
hidden: true
align: top_right
x: -10
y: 80
text_align: right
text_color: 0xFFFFFF
- label:
align: RIGHT_MID
id: display_date
text: date
text_font: roboto24
text_color: 0xFFFFFF
y: -70
x: -45
- label:
align: RIGHT_MID
id: display_time
text: clock
text_font: roboto90
text_color: 0xFFFFFF
y: -130
x: -30
- image:
align: LEFT_MID
id: display_weather_image
src: w_green
y: -110
x: 0
- label:
align: CENTER
id: display_temp
text: temp
text_font: roboto32
text_color: 0xFFFFFF
y: -150
x: -80
- obj:
id: boot_screen
x: 0
y: 0
width: 100%
height: 100%
bg_color: 0x000000
bg_opa: COVER
radius: 0
pad_all: 0
border_width: 0
widgets:
- image:
align: CENTER
src: boot_logo
- spinner:
align: CENTER
y: 95
height: 50
width: 50
spin_time: 1s
arc_length: 60deg
arc_width: 8
indicator:
arc_color: 0x18bcf2
arc_width: 8
on_press:
- lvgl.widget.hide: boot_screen
page_wrap: true
pages:
- id: clock_page
widgets:
- image:
align: CENTER
src: back1
- label:
text: "\U000F04C3"
id: radio_status
hidden: true
align: top_left
x: 300
y: 2
text_font: top_icons
text_align: left
text_color: 0xFFFFFF
- label:
text: "\U000F0379"
id: tv_status
hidden: true
align: top_left
x: 260
y: 2
text_font: top_icons
text_align: left
text_color: 0xFFFFFF
- label:
text: "\U000F10AF"
id: schuur_status
hidden: true
align: top_left
x: 220
y: 2
text_font: top_icons
text_align: left
text_color: 0xFFFFFF
- label:
align: LEFT_MID
id: display_solar
text: Solar
text_font: roboto24
text_color: 0xFFFFFF
y: 42
x: 20
- label:
align: LEFT_MID
id: display_solar2
text: Solar2
text_font: roboto24
text_color: 0xFFFFFF
y: 85
x: 20
- label:
text: "\U000F0872"
id: garage_status
hidden: true
align: top_left
x: 180
y: 2
text_font: top_icons
text_align: left
text_color: 0xFFFFFF
- label:
text: "\U000F081C"
id: kelder_status
hidden: true
align: top_left
x: 140
y: 2
text_font: top_icons
text_align: left
text_color: 0xFFFFFF
- label:
text: "\U000F058F"
id: hotwater_status
hidden: true
align: top_left
x: 100
y: 2
text_font: top_icons
text_align: left
text_color: 0xBD0000
- label:
text: "\U000F0438"
id: heating_status
hidden: true
align: top_left
x: 60
y: 2
text_font: top_icons
text_align: left
text_color: 0xBD0000
- label:
id: display_airco_icon
align: top_left
x: 20
y: 2
text_font: top_airco
text_align: left
text_color: 0xFFFFFF
- button:
x: 10
y: 400
width: 150
height: 58
checkable: true
widgets:
- label:
text_font: huelight32
id: zolderlamp_button
text: "\U0000EA10"
align: LEFT_MID
- label:
text_font: roboto24
text: "Lampen"
text_color: 0xFFFFFF
long_mode: dot
align: RIGHT_MID
on_click:
- homeassistant.service:
service: light.toggle
data_template:
entity_id: light.woonkamer_lampen
- button:
x: 170
y: 400
width: 150
height: 58
checkable: true
widgets:
- label:
text_font: huelight32
id: keuken_button
text: "\U0000EA5C"
align: LEFT_MID
- label:
text: "Keuken"
text_color: 0xFFFFFF
long_mode: dot
align: RIGHT_MID
on_click:
- light.toggle: panel_switch
- button:
x: 330
y: 400
width: 140
height: 58
checkable: true
widgets:
- label:
text_font: huelight32
id: buitenlamp_button
text: "\U0000E95F"
align: LEFT_MID
- label:
text: "Buiten"
text_color: 0xFFFFFF
long_mode: dot
align: RIGHT_MID
on_click:
- homeassistant.service:
service: switch.toggle
data_template:
entity_id: switch.buitenlamp
- button:
x: 0
y: 210
width: 160
height: 50
bg_opa: TRANSP
shadow_opa: TRANSP
widgets:
- label:
id: display_house_temp
text: house temp
text_font: roboto32
text_color: 0xFFFFFF
on_press:
then:
lvgl.page.show: hvac_page
- button:
x: 250
y: 320
width: 60
height: 50
widgets:
- label:
text_font: roboto24
id: cov_up_myroom
align: CENTER
text: "\U000F0143"
on_press:
then:
- homeassistant.service:
service: cover.open_cover
data:
entity_id: cover.rolluikwoonkamer_cover_1
- button:
x: 320
y: 320
width: 60
height: 50
widgets:
- label:
id: cov_stop_myroom
align: CENTER
text: STOP
on_press:
then:
- homeassistant.service:
service: cover.stop_cover
data:
entity_id: cover.rolluikwoonkamer_cover_1
- button:
x: 390
y: 320
width: 60
height: 50
widgets:
- label:
id: cov_down_myroom
align: CENTER
text: "\U000F0140"
on_press:
then:
- homeassistant.service:
service: cover.close_cover
data:
entity_id: cover.rolluikwoonkamer_cover_1
- button:
x: 280
y: 210
id: mm_btn
bg_opa: TRANSP
shadow_opa: TRANSP
width: 50
height: 50
widgets:
- label:
text_font: roboto40
align: CENTER
text: "\U000F04C3"
on_press:
then:
lvgl.page.show: multimedia
- button:
x: 280
y: 260
id: qr_btn
bg_opa: TRANSP
shadow_opa: TRANSP
width: 50
height: 50
widgets:
- label:
text_font: roboto40
align: CENTER
text: "\U000F0433"
on_press:
then:
lvgl.page.show: qr
- button:
x: 350
y: 260
id: trash_btn
bg_opa: TRANSP
shadow_opa: TRANSP
width: 50
height: 50
widgets:
- label:
text_font: roboto40
align: CENTER
text: "\U000F174F"
on_press:
then:
lvgl.page.show: trash
- button:
x: 350
y: 210
id: music_btn
bg_opa: TRANSP
shadow_opa: TRANSP
width: 50
height: 50
widgets:
- label:
text_font: roboto40
align: CENTER
text: "\U000F075A"
on_press:
then:
- homeassistant.service:
service: script.turn_on
data:
entity_id: script.mediacenter_on
- id: hvac_page
widgets:
- image:
align: CENTER
src: back1
- obj: # a properly placed coontainer object for all these controls
layout: # enable the GRID layout for the children widgets
type: GRID # split the rows and the columns proportionally
grid_columns: [FR(1), FR(1)] # equal
grid_rows: [FR(50), FR(50)] # like percents
width: 100%
height: 90%
#align: CENTER
pad_all: 15
pad_top: 22
#pad_row: 6
#pad_column: 2
bg_opa: TRANSP
border_opa: TRANSP
widgets:
- obj:
id: info_btn
#checkable: false
grid_cell_column_pos: 1 # place the widget in
grid_cell_row_pos: 1 # the corresponding cell
grid_cell_x_align: STRETCH
grid_cell_y_align: STRETCH
bg_color: 0x333333
bg_opa: TRANSP
border_color: 0x333333
border_width: 0
text_color: 0xFFFFFF
widgets:
- button:
align: CENTER
width: 110
height: 35
#x: 0
y: -60
checkable: false
widgets:
- label:
text_font: roboto24
text: "+"
align: CENTER
on_click:
- homeassistant.service:
service: input_number.increment
data:
entity_id: input_number.woonkamer_temperature_setpoint
- label:
text_font: btn_icons_font2
text: $house_temp
align: CENTER
y: -5
- label:
id: woonkamer_setpoint_display
text_font: roboto24
text: "--- °C"
align: CENTER
y: 25
- button:
align: CENTER
width: 110
height: 35
#x: 0
y: 60
checkable: false
widgets:
- label:
text_font: roboto24
text: "-"
align: CENTER
on_click:
- homeassistant.service:
service: input_number.decrement
data:
entity_id: input_number.woonkamer_temperature_setpoint
- label:
id: display_house_temp2
text: house temp
text_font: roboto32
text_color: 0xFFFFFF
y: 220
x: 15
- label:
align: LEFT_MID
id: display_co2
text: "\000F07E4"
text_font: roboto24
text_color: 0xFFFFFF
y: 42
x: 20
- button:
x: 440
y: 5
width: 40
height: 40
bg_opa: TRANSP
shadow_opa: TRANSP
widgets:
- label:
id: button_close
align: CENTER
text_font: roboto24
text: "\U000F0159"
on_press:
- lvgl.page.show:
id: clock_page
- label:
x: 5
y: 5
text: "Thermostaat Woonkamer"
text_font: roboto24
text_color: 0xFFFFFF
- id: airco_page
widgets:
- image:
align: CENTER
src: back1
- obj: # a properly placed coontainer object for all these controls
layout: # enable the GRID layout for the children widgets
type: GRID # split the rows and the columns proportionally
grid_columns: [FR(1), FR(1), FR(1)] # equal
grid_rows: [FR(50), FR(50)] # like percents
width: 100%
height: 90%
#align: CENTER
pad_all: 15
pad_top: 22
#pad_row: 6
#pad_column: 2
bg_opa: TRANSP
border_opa: TRANSP
widgets:
- obj:
id: info_btn2
#checkable: false
grid_cell_column_pos: 2 # place the widget in
grid_cell_row_pos: 1 # the corresponding cell
grid_cell_x_align: STRETCH
grid_cell_y_align: STRETCH
bg_color: 0x333333
bg_opa: TRANSP
border_color: 0x333333
border_width: 0
text_color: 0xFFFFFF
widgets:
- button:
align: CENTER
width: 110
height: 35
#x: 0
y: -60
checkable: false
widgets:
- label:
text_font: roboto24
text: "+"
align: CENTER
on_click:
- homeassistant.service:
service: input_number.increment
data:
entity_id: input_number.zolderairco_temperature_setpoint
- label:
id: aircoicon
text_font: roboto40
text: $airco
align: CENTER
y: -5
- label:
id: airco_setpoint_display
text_font: roboto24
text: "--- °C"
align: CENTER
y: 25
- button:
align: CENTER
width: 110
height: 35
#x: 0
y: 60
checkable: false
widgets:
- label:
text_font: roboto24
text: "-"
align: CENTER
on_click:
- homeassistant.service:
service: input_number.decrement
data:
entity_id: input_number.zolderairco_temperature_setpoint
- obj:
id: info_btn3
#checkable: false
grid_cell_column_pos: 1 # place the widget in
grid_cell_row_pos: 1 # the corresponding cell
grid_cell_x_align: STRETCH
grid_cell_y_align: STRETCH
bg_color: 0x333333
bg_opa: TRANSP
border_color: 0x333333
border_width: 0
text_color: 0xFFFFFF
widgets:
- button:
align: LEFT_MID
width: 50
height: 35
x: 0
y: 20
checkable: false
widgets:
- label:
id: aircocool
text_font: airco24
text: $cool
align: CENTER
on_click:
- homeassistant.service:
service: climate.set_fan_mode
data:
entity_id: climate.aircozolder_mqtt_hvac
fan_mode: night
- homeassistant.service:
service: climate.set_hvac_mode
data:
entity_id: climate.aircozolder_mqtt_hvac
hvac_mode: cool
- button:
align: LEFT_MID
width: 50
height: 35
x: 0
y: -20
checkable: false
widgets:
- label:
id: aircodry
text_font: airco24
text: $dry
align: CENTER
on_click:
- homeassistant.service:
service: climate.set_hvac_mode
data:
entity_id: climate.aircozolder_mqtt_hvac
hvac_mode: dry
- button:
align: RIGHT_MID
width: 50
height: 35
#x: 0
y: 20
checkable: false
widgets:
- label:
id: aircoheat
text_font: airco24
text: $heat
align: CENTER
on_click:
- homeassistant.service:
service: climate.set_hvac_mode
data:
entity_id: climate.aircozolder_mqtt_hvac
hvac_mode: heat
- button:
align: RIGHT_MID
width: 50
height: 35
#x: 0
y: -20
checkable: false
widgets:
- label:
id: aircofan
text_font: airco24
text: $fan
align: CENTER
on_click:
- homeassistant.service:
service: climate.set_hvac_mode
data:
entity_id: climate.aircozolder_mqtt_hvac
hvac_mode: fan_only
- button:
align: CENTER
width: 110
height: 35
#x: 0
y: 60
checkable: false
widgets:
- label:
text_font: airco24
text: $powerbutton
align: CENTER
on_click:
- homeassistant.service:
service: climate.turn_off
data:
entity_id: climate.aircozolder_mqtt_hvac
- id: multimedia
widgets:
- image:
align: CENTER
src: back1
- button:
x: 440
y: 5
width: 40
height: 40
bg_opa: TRANSP
shadow_opa: TRANSP
widgets:
- label:
align: CENTER
text_font: roboto24
text: "\U000F0159"
on_press:
- lvgl.page.show:
id: clock_page
- label:
x: 5
y: 5
text: "Marantz NR1509"
text_font: roboto24
text_color: 0xFFFFFF
- button:
x: 10
y: 200
width: 50
height: 50
bg_opa: TRANSP
shadow_opa: TRANSP
widgets:
- label:
text_font: roboto32
id: receiver_button
text: "\U000F0906"
align: LEFT_MID
on_click:
- homeassistant.service:
service: switch.toggle
data_template:
entity_id: switch.marantz_power
- button:
id: marantz_mute_button_1
bg_opa: TRANSP
shadow_opa: TRANSP
width: 50
height: 40
widgets:
- label:
text_font: roboto32
id: marantz_mute_button
text: "\U000F0906"
align: LEFT_MID
y: 430
x: 10
on_click:
- homeassistant.service:
service: media_player.volume_mute
data: