-
Notifications
You must be signed in to change notification settings - Fork 3
/
lovelace_new_data.yaml
2178 lines (2049 loc) · 98.3 KB
/
lovelace_new_data.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
# lovelace_gen
# http://patorjk.com/software/taag/#p=display&f=Banner3&t=Type%20Something%20
######## ######## ######## #### ## ## #### ######## #### ####### ## ## ######
## ## ## ## ## ### ## ## ## ## ## ## ### ## ## ##
## ## ## ## ## #### ## ## ## ## ## ## #### ## ##
## ## ###### ###### ## ## ## ## ## ## ## ## ## ## ## ## ######
## ## ## ## ## ## #### ## ## ## ## ## ## #### ##
## ## ## ## ## ## ### ## ## ## ## ## ## ### ## ##
######## ######## ## #### ## ## #### ## #### ####### ## ## ######
# DEFINITIONS
#--------------------------------------------------------------------------------------------------
# General
#--------------------------------------------------------------------------------------------------
{% set border_radius = 12 %}
{% set background_color = 'rgba(255, 255, 255, 0.1)' %}
{% set background_color_alert = 'rgba(255, 0, 0, 0.2)' %}
{% set group_scaleX, group_scaleY = 1, 1 %}
{% set scheduler_left_offset, scheduler_top_offset = 1, 1 %}
{% set scheduler_scaleX, scheduler_scaleY = 0.6, 0.6 %}
{% set timer_top_offset = 2.5 %}
{% set days = [("sunday" , "1", "Sun", "ראשון"),
("monday" , "2", "Mon", "שני"),
("tuesday" , "3", "Tue", "שלישי"),
("wednesday", "4", "Wed", "רביעי"),
("thursday" , "5", "Thu", "חמישי"),
("friday" , "6", "Fri", "שישי"),
("saturday" , "7", "Sat", "שבת")] %}
{% set graph_span = [("hour" , 1),
("2 hours" , 2),
("6 hours" , 6),
("12 hours", 12),
("18 hours", 18),
("day" , 24),
("36 hours", 36),
("2 days" , 48),
("3 days" , 72)] %}
#--------------------------------------------------------------------------------------------------
# Lights
# - List all active areas.
# If more than one exists with the same name - must be consecutive
# - List groups for group buttons
#--------------------------------------------------------------------------------------------------
# entity , group , left, top, scaleX, scaleY, deg)
{% set lights = [("diningroom_light" , "downstairs", 69 , 67 , 1.3, 2 , 0),
("kitchen_light_ceiling" , "downstairs", 62.5, 82 , 1.1, 1.2, 0),
("kitchen_light_klapa" , "downstairs", 59 , 84 , 0.7, 1.7, 0),
("kitchen_table_light" , "downstairs", 64 , 73.5, 0.6, 0.6, 0),
("garden_shed_light" , "outside" , 73.5, 58 , 0.7, 1.2, 0),
("garden_light_top" , "outside" , 89 , 24 , 2.4, 2.4, 0),
("garden_light_bottom" , "outside" , 69 , 20 , 8.5, 1.3, 0),
("garden_light_bottom" , "outside" , 85 , 56 , 1.3, 6.5, 23),
("playroom_light" , "downstairs", 54 , 51 , 2 , 2.6, 0),
("guest_bathroom_light" , "downstairs", 70.7, 82 , 0.7, 1.4, 0),
("patio_light_top" , "outside" , 65 , 32 , 2 , 2 , 0),
("patio_light_bottom" , "outside" , 58 , 32 , 2 , 2 , 0),
("master_bathroom_light_top" , "upstairs" , 44.5, 84 , 1.3, 0.7, 0),
("master_bathroom_light_bottom" , "upstairs" , 44.5, 79 , 1.3, 0.6, 0),
("laundryroom_light" , "upstairs" , 44.5, 72.5, 1.3, 1.1, 0),
("main_bathroom_light_bottom" , "upstairs" , 44.5, 66 , 1.3, 0.6, 0),
("main_bathroom_light_top" , "upstairs" , 44.5, 60.5, 1.3, 0.9, 0),
("noga_light" , "upstairs" , 43.2, 48.5, 1.6, 1.6, 0),
("ella_light" , "upstairs" , 36.5, 47 , 2 , 1.8, 0),
("tomer_light" , "upstairs" , 29 , 50.5, 1.9, 2.7, 0),
("roof_light_bottom" , "roof" , 5.5 , 51 , 2.6, 2.2, 0),
("roof_light_top" , "roof" , 10 , 76 , 2.2, 4.2, 0),
("pantry_light" , "downstairs", 61 , 73.5, 0.6, 0.6, 0),
("hallway_light" , "upstairs" , 37.2, 58 , 2.9, 1.3, 0),
("hallway_light" , "upstairs" , 41 , 66 , 0.6, 2.8, 0),
("stairs_light" , "upstairs" , 61.5, 67 , 2.5, 1.5, 0),
("stairs_light" , "upstairs" , 36.2, 67 , 2.3, 1.5, 0),
("master_bedroom_right_light" , "upstairs" , 40.5, 80.5, 1 , 1.8, 0),
("master_bedroom_left_light" , "upstairs" , 35.8, 83 , 1.9, 2.8, 0)] %}
# group , left, top
{% set light_groups = [("outside" , 53, 37),
("downstairs", 53, 74),
("upstairs" , 28, 74),
("roof" , 3 , 74)] %}
#--------------------------------------------------------------------------------------------------
# Covers
# - List active area (windows/doors)
# - List groups for group buttons
#--------------------------------------------------------------------------------------------------
# entity , group , left, top, scaleX, scaleY, tap_action
{% set covers = [("diningroom_window_shutter", "downstairs", 72.9 , 68.5, 0.3 , 1.8 , "toggle"),
("livingroom_window_shutter", "downstairs", 72.9 , 50.5, 0.3 , 1.8 , "toggle"),
("livingroom_door_shutter" , "downstairs", 62 , 42.2, 3.4 , 0.3 , "toggle"),
("playroom_window_shutter" , "downstairs", 54.5 , 42.35, 1.8 , 0.40, "toggle"),
("noga_window_shutter_north", "upstairs" , 47.75, 52 , 0.25, 1.4 , "toggle"),
("noga_window_shutter_west" , "upstairs" , 44.2 , 42.3, 1.4 , 0.3, "toggle"),
("ella_window_shutter" , "upstairs" , 37.2 , 40.7, 1.4 , 0.3, "toggle"),
("roof_trap_door" , "upstairs" , 12.8 , 60.3, 1.3 , 0.8 , "none")] %}
# group , left, top
{% set cover_groups = [("downstairs", 53, 68),
("upstairs" , 28, 68)] %}
#--------------------------------------------------------------------------------------------------
# Boiler
#--------------------------------------------------------------------------------------------------
# entity , type , left, top, display_name)
{% set boilers = [("boiler_switch" , "switch", 3 , 68, "Water Boiler")] %}
#--------------------------------------------------------------------------------------------------
# Irrigation
#--------------------------------------------------------------------------------------------------
# entity , type , left, top, display_name)
{% set group_irrigation_left, group_irrigation_top = 53 ,31 %}
{% set irrigation_valves = [("irrigation_sprinkler_west" , "switch", 78, 34, "West Sprinklers"),
("irrigation_sprinkler_north", "switch", 82, 51, "North Sprinklers"),
("irrigation_drips" , "switch", 87, 55, "Drips")] %}
#--------------------------------------------------------------------------------------------------
# Vacuums
#--------------------------------------------------------------------------------------------------
# entity , left, top
{% set vacuums = [("bottom", 53 , 80),
("top" , 28 , 80)] %}
#--------------------------------------------------------------------------------------------------
# HVAC
#--------------------------------------------------------------------------------------------------
# entity , left, top
{% set hvacs = [("downstairs", 53 , 92),
("upstairs" , 28 , 92)] %}
#--------------------------------------------------------------------------------------------------
# Navigation
# - Entities are placed from bottom to top starting from navi_top value
#--------------------------------------------------------------------------------------------------
{% set navi_left, navi_top = 96, namespace(value=94) %}
{% set navi_left_offset, navi_top_offset = 1, 3 %}
{% set navi_scaleX, navi_scaleY, navi_scaleT = 0.3, 0.3, 3.5 %}
{% set navigations = ["kfar_yona", "petach_tikva", "work_aviva", "work_dan"] %}
#--------------------------------------------------------------------------------------------------
# Cameras
#--------------------------------------------------------------------------------------------------
# entity , type , left, top, icon, display_name)
{% set cameras = [("camera_1_generic" , "generic", 67, 92, "", "Camera 1"),
("camera_1_mjpeg" , "generic", 69, 92, "", "Camera 1"),
("camera_1_mediaprofile_000" , "generic", 71, 92, "mdi:cctv", "Camera 1")] %}
#--------------------------------------------------------------------------------------------------
# Statusbar
# - Icons are placed from right to left
#--------------------------------------------------------------------------------------------------
{% set statusbar_color = 'red' %}
{% set statusbar_left, statusbar_top = namespace(value=97), 1 %}
{% set statusbar_left_offset = -1.5 %}
{% set statusbar_scaleX, statusbar_scaleY = 0.8, 0.8 %}
# number, entity , state_t_f, state, icon, card_type
{% set statusbar_entities = [("1", "sensor.update_available" , "t", "1", "mdi:cloud-download", "ha_updates"),
("2", "sensor.mfc_j470dw_ink_low" , "f", "0" , "mdi:printer-alert" , "entities"),
("3", "sensor.water_consumption_limit_exceeded" , "f", "0" , "mdi:water-alert" , "history-graph")] %}
{% set statusbar_details = [("2", "sensor.mfc_j470dw_black_ink_remaining"),
("2", "sensor.mfc_j470dw_cyan_ink_remaining"),
("2", "sensor.mfc_j470dw_magenta_ink_remaining"),
("2", "sensor.mfc_j470dw_yellow_ink_remaining"),
("3", "sensor.water_consumption_hourly_limit_exceeded"),
("3", "sensor.water_consumption_daily_limit_exceeded"),
("3", "sensor.water_consumption_monthly_limit_exceeded"),
("3", "sensor.water_consumption_monthly_forecast_limit_exceeded"),
("3", "sensor.water_consumption_hourly"),
("3", "sensor.water_meter_16452690_today_s_consumption"),
("3", "sensor.water_meter_16452690_monthly_consumption"),
("3", "sensor.water_meter_16452690_consumption_predication")] %}
#--------------------------------------------------------------------------------------------------
# Settings
# - Divided into "tabs" and seperated by "section"
# If a sections is defined as "y" then the "label" is used as the header
# The type can be either a "slider" or an "entity"
#--------------------------------------------------------------------------------------------------
{% set settings_color = 'gray' %}
{% set settings_left, settings_top = 98.5, 1 %}
{% set settings_scaleX, settings_scaleY = 0.8, 0.8 %}
{% set settings_tab_names = ["Visual Limit", "Functional Limits", "Visual"] %}
# entity , tab, section, label , type, action, data
{% set settings_entities = [("input_number.mfc_j470dw_ink_low_limit" , "1", "y", "Printers" , "slider", "", ""),
("input_number.water_consumption_hourly_limit" , "1", "y", "Water Consumption" , "slider", "", ""),
("input_number.water_consumption_daily_limit" , "1", "n", "" , "slider", "", ""),
("input_number.water_consumption_monthly_limit" , "1", "n", "" , "slider", "", ""),
("input_number.water_consumption_monthly_forecast_limit" , "1", "n", "" , "slider", "", ""),
("input_number.boiler_disable_schedulers_temperature" , "2", "y", "Water Boiler" , "slider", "", ""),
("input_number.ui_water_boiler_max_time_limit" , "2", "y", "" , "slider", "", ""),
("input_number.ui_irrigation_max_time_limit" , "2", "y", "Irrigation" , "slider", "", ""),
("script.1586449615879" , "3", "y", "Home Assistant Control", "entity", "", ""),
("input_boolean.ui_hide_room_temperatures" , "3", "y", "Hide" , "entity", "", ""),
("input_boolean.ui_hide_water_boiler_temperatures" , "3", "n", "" , "entity", "", ""),
("input_boolean.ui_hide_weather " , "3", "n", "" , "entity", "", ""),
("input_boolean.ui_hide_calendar " , "3", "n", "" , "entity", "", ""),
("input_boolean.ui_hide_navigation" , "3", "n", "" , "entity", "", ""),
("input_boolean.ui_show_timer_bar_or_time" , "3", "y", "Visual Options" , "entity", "", "")] %}
#--------------------------------------------------------------------------------------------------
# Clock
#--------------------------------------------------------------------------------------------------
{% set clock_left, clock_top = 87, -2 %}
{% set clock_scaleX, clock_scaleY = 1.5, 1.5 %}
#--------------------------------------------------------------------------------------------------
# Actions
# - Buttons are placed from left to right
#--------------------------------------------------------------------------------------------------
{% set actions_left, actions_top = namespace(value=60), 3 %}
{% set actions_left_offset = 8 %}
{% set actions_scaleX, actions_scaleY = 3, 3 %}
# entity
{% set actions_entities = [("input_boolean.away" ),
("input_boolean.goodnight"),
("cover.garage_door" )] %}
#--------------------------------------------------------------------------------------------------
# Temperature Sensors
# - They include humidity and battery values as well
#--------------------------------------------------------------------------------------------------
{% set temperature_sensors_font_size = 75 %}
# entity , category , left, top
{% set temperature_sensors = [("master_bedroom_sensor_temperature" , "room" , 36.5, 93 ),
("noga_sensor_temperature" , "room" , 45 , 59 ),
("ella_sensor_temperature" , "room" , 36 , 56 ),
("tomer_sensor_temperature" , "room" , 28 , 61.5),
("livingroom_tv_sensor_temperature" , "room" , 59 , 63 ),
("livingroom_corner_sensor_temperature" , "room" , 71.5, 47 ),
("kitchen_sensor_temperature" , "room" , 59 , 76 ),
("water_boiler_temperature_panel_out" , "water_boiler" , 3.5 , 52 ),
("water_boiler_temperature_in_from_panel", "water_boiler" , 9.5 , 43 ),
("water_boiler_temperature_out_to_panel" , "water_boiler" , 9.5 , 47 ),
("livingroom_temperature" , "room" , 71.5, 45.5),
("hallway_temperature" , "room" , 36.6, 65.5)] %}
# entity , category, left, top
{% set humidity_sensors = [("master_bedroom_sensor_humidity" , "room", 36.5, 93 ),
("noga_sensor_humidity" , "room", 45 , 59 ),
("ella_sensor_humidity" , "room", 36 , 56 ),
("tomer_sensor_humidity" , "room", 28 , 61.5),
("livingroom_tv_sensor_humidity" , "room", 59 , 63 ),
("livingroom_corner_sensor_humidity", "room", 71.5, 47 ),
("kitchen_sensor_humidity" , "room", 59 , 76 )] %}
# entity , category, left, top
{% set battery_sensors = [("master_bedroom_sensor_battery" , "room", 36.5, 93 ),
("noga_sensor_battery" , "room", 45 , 59 ),
("ella_sensor_battery" , "room", 36 , 56 ),
("tomer_sensor_battery" , "room", 28 , 61.5),
("livingroom_tv_sensor_battery" , "room", 59 , 63 ),
("livingroom_corner_sensor_battery", "room", 71.5, 47 ),
("kitchen_sensor_battery" , "room", 59 , 76 )] %}
#--------------------------------------------------------------------------------------------------
# Conditional Entities
# - Will only be displayed if condition "state" active
#--------------------------------------------------------------------------------------------------
{% set conditional_color = "red" %}
# entity , state, left, top, icon , tap_action
{% set conditional_entities = [("switch.roof_right_table_power_relay" , "on" , 10 , 67, "mdi:power" , "toggle"),
("binary_sensor.water_boiler_power_pump_controller_status", "on" , 8.5, 47, "mdi:pump" , "none" ),
("switch.water_boiler_temperature_pump_manual" , "on" , 8.5, 48, "mdi:pump" , "none" ),
("binary_sensor.water_boiler_power_wall_switch_status" , "on" , 11, 45, "mdi:water-boiler" , "none" ),
("switch.main_bathroom_heater" , "on" , 44 , 66, "mdi:radiator" , "toggle"),
("switch.master_bathroom_heater" , "on" , 44 , 83, "mdi:radiator" , "toggle"),
("lock.nuki_home_door_lock" , "unlocked", 69 , 88, "mdi:lock-open" , "none" ),
("binary_sensor.nuki_home_door_battery_critical" , "on" , 69 , 88, "mdi:battery-alert" , "none" ),
("binary_sensor.nuki_home_door_battery_charging" , "on" , 69 , 88, "mdi:battery-charging-medium", "none" )] %}
## ## ### ###### ######## ####### ######
### ### ## ## ## ## ## ## ## ## ## ##
#### #### ## ## ## ## ## ## ## ##
## ### ## ## ## ## ######## ## ## ######
## ## ######### ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ###### ## ## ####### ######
# MACROS
{% macro disable_tap_hold_double_ws(tap, hold, double_tap, ws) -%}
{% if tap == 1 %}
{{" "*ws}}tap_action:
{{" "*ws}} action: none
{% endif %}
{% if hold == 1 %}
{{" "*ws}}hold_action:
{{" "*ws}} action: none
{% endif %}
{% if double_tap == 1 %}
{{" "*ws}}double_tap_action:
{{" "*ws}} action: none
{% endif %}
{%- endmacro %}
#########################################################
#########################################################
#########################################################
{% macro create_graph_span_buttons_ws(ws) -%}
# {{" "*ws}}- type: grid
# {{" "*ws}} columns: {{ graph_span | count }}
# {{" "*ws}} square: false
# {{" "*ws}} cards:
# {{" "*ws}} {% for label, span in graph_span %}
# {{" "*ws}} - type: button
# {{" "*ws}} - type: custom:button-card
# {{" "*ws}} name: {{ label }}
# {{" "*ws}} show_name: true
# {{" "*ws}} show_icon: false
# {{" "*ws}} show_state: false
# {{" "*ws}} tap_action:
# {{" "*ws}} action: call-service
# {{" "*ws}} service: input_select.select_option
# {{" "*ws}} service_data:
# {{" "*ws}} entity_id: input_select.ui_graph_hours
# {{" "*ws}} option: {{ span }}
# {{" "*ws}} {% endfor %}
{{" "*ws}}- type: custom:paper-buttons-row
{{" "*ws}} buttons:
{{" "*ws}} {% for label, span in graph_span %}
{{" "*ws}} - entity: input_select.ui_graph_hours
{{" "*ws}} name: {{ label }}
{{" "*ws}} icon: false
{{" "*ws}} tap_action:
{{" "*ws}} action: call-service
{{" "*ws}} service: input_select.select_option
{{" "*ws}} service_data:
{{" "*ws}} entity_id: input_select.ui_graph_hours
{{" "*ws}} option: {{ span }}
{{" "*ws}} state_styles:
{{" "*ws}} "{{ span }}":
{{" "*ws}} name:
{{" "*ws}} background-color: var(--primary-color)
{{" "*ws}} {% endfor %}
{%- endmacro %}
#########################################################
#########################################################
#########################################################
{% macro create_schedulers_icons(entity, left, top) -%}
{% if (entity == "hvac_upstairs") or (entity == "hvac_downstairs") %}
{% set schedulers = ['1', '2', '3', '4'] %}
{% else %}
{% set schedulers = ['1', '2'] %}
{% endif %}
{% for s in schedulers %}
- type: conditional
conditions:
- entity: input_boolean.{{ entity }}_scheduler_enable{{ s }}
state: 'on'
elements:
- type: icon
icon: 'mdi:timer-outline'
style:
{% if s == '1' %}
left: {{ left + scheduler_left_offset }}%
top: {{ top - scheduler_top_offset }}%
{% elif s == '2' %}
left: {{ left + scheduler_left_offset }}%
top: {{ top + scheduler_top_offset }}%
{% elif s == '3' %}
left: {{ left - scheduler_left_offset }}%
top: {{ top - scheduler_top_offset }}%
{% elif s == '4' %}
left: {{ left - scheduler_left_offset }}%
top: {{ top + scheduler_top_offset }}%
{% endif %}
transform: translate(-50%, -50%) scale({{ scheduler_scaleX }}, {{ scheduler_scaleY }})
{{ disable_tap_hold_double_ws(1, 1, 1, 6) }}
{% endfor %}
{%- endmacro %}
#########################################################
#########################################################
#########################################################
{% macro create_warning_background(entity_problem, entity, left, top) -%}
- type: conditional
conditions:
- entity: sensor.{{ entity_problem }}
state_not: '0'
elements:
- type: state-icon
entity: {{ entity }}
style:
background-color: {{ background_color_alert }}
border-radius: {{ border_radius }}%
left: {{ left }}%
top: {{ top }}%
transform: translate(-50%, -50%) scale({{ group_scaleX}}, {{ group_scaleY }})
{{ disable_tap_hold_double_ws(1, 1, 1, 6) }}
{%- endmacro %}
#########################################################
#########################################################
#########################################################
# types: DSD - Day Start Duration
# DS - Day Start
# S_HVAC - Start HVAC
{% macro create_schedulers_popup(entity, scheduler_type) -%}
{% if (scheduler_type == "S_HVAC") %}
{% set num_schedulers = 4 %}
{% set schedulers = ['1', '2', '3', '4'] %}
{% else %}
{% set num_schedulers = 2 %}
{% set schedulers = ['1', '2'] %}
{% endif %}
type: grid
columns: {{ num_schedulers }}
square: false
cards:
{% for s in schedulers %}
- type: grid
columns: 1
square: false
title: Scheduler {{ s }}
cards:
- type: custom:mushroom-entity-card
entity: input_boolean.{{ entity }}_scheduler_enable{{ s }}
secondary_info: none
fill_container: true
tap_action:
action: toggle
{{ disable_tap_hold_double_ws(0, 1, 1, 12) }}
{% if (scheduler_type == "DSD") or (scheduler_type == "DS") %}
- type: grid
columns: 7
square: false
cards:
{% for day, number, name, name_he in days %}
- type: custom:mushroom-entity-card
entity: input_boolean.{{ entity }}_day_{{ day }}{{ s }}
primary_info: none
secondary_info: none
name: {{ name_he }}
icon: mdi:numeric-{{ number }}-box-outline
layout: vertical
fill_container: true
tap_action:
action: toggle
{{ disable_tap_hold_double_ws(0, 1, 1, 14) }}
{% endfor %}
{% endif %}
- type: 'custom:time-picker-card'
entity: input_datetime.{{ entity }}_start_time{{ s }}
{{ disable_tap_hold_double_ws(1, 1, 1, 12) }}
layout:
embedded: true
name: inside
align_controls: right
{% if scheduler_type == "DSD" %}
- type: custom:mushroom-number-card
entity: input_number.{{ entity }}_timer_duration{{ s }}
icon: 'mdi:timer-outline'
fill_container: true
layout: horizontal
{{ disable_tap_hold_double_ws(1, 1, 1, 12) }}
{% endif %}
{% if (scheduler_type == "S_HVAC") %}
- type: thermostat
entity: climate.{{ entity }}_virtual{{ s }}
features:
- type: climate-hvac-modes
style: icons
hvac_modes:
- 'off'
- cool
- heat
- auto
- type: climate-fan-modes
style: icons
fan_modes:
- low
- high
- mid
{% endif %}
{% endfor %}
{%- endmacro %}
###### ######## ### ######## ########
## ## ## ## ## ## ## ##
## ## ## ## ## ## ##
###### ## ## ## ######## ##
## ## ######### ## ## ##
## ## ## ## ## ## ## ##
###### ## ## ## ## ## ##
# START
badges: []
icon: 'mdi:home-outline'
panel: true
path: floorplan
title: FloorPlan
cards:
- type: picture-elements
image: /local/images/floorplan/background_t.png
elements:
######## #### ###### ## ## ######## ######## ######## ######
## ## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ##
######## ## ## ## ## ## ###### ######## ######
## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ##
## #### ###### ####### ## ######## ## ## ######
# PICTURES
{% for entity, group, left, top, scaleX, scaleY, deg in lights %}
{% if ((loop.index0 == 0) or ((loop.previtem is defined) and (entity != loop.previtem))) %}
- type: image
entity: light.{{ entity }}
state_image:
'unavailable': /local/images/floorplan/transparent_square.png
'off': /local/images/floorplan/transparent_square.png
'on': /local/images/floorplan/lights/{{ entity }}.png
style:
left: 50%
top: 50%
width: 100%
{{ disable_tap_hold_double_ws(1, 1, 1, 4) }}
{% endif %}
{% endfor %}
## ## ######## ### ######## ## ## ######## ########
## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ###### ## ## ## ######### ###### ########
## ## ## ## ######### ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ##
### ### ######## ## ## ## ## ## ######## ## ##
# WEATHER
- type: conditional
conditions:
- entity: input_boolean.ui_hide_weather
state_not: 'on'
elements:
# - type: custom:clock-weather-card
# entity: weather.accuweather
# sun_entity: sun.sun
# weather_icon_type: fill
# animated_icon: false
# forecast_days: 5
# locale: he
# time_format: 24
# hide_today_section: false
# hide_forecast_section: false
# style:
# #border: 1px solid red
# left: -3% #-3% 0%
# top: -5% #-3% 0%
# transform: 'translate(50%, 50%) scale(1.5, 1.5)'
- type: custom:weather-card
entity: weather.accuweather
icons: "/local/icons/weather_icons/static/"
current: true
details: true # true false
number_of_forecasts: 5
hourly_forecast: false
style:
#border: 1px solid red
left: -2% #-3% 0%
top: -2% #-3% 0%
transform: 'translate(0%, 0%) scale(0.9, 0.9)'
- type: image
image: /local/images/floorplan/transparent_square.png
entity: weather.openweathermap
style:
#border: 1px solid red
left: 0%
top: 0%
width: 23.8%
height: 31.2%
transform: 'translate(0%, 0%) scale(1, 1)'
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
browser_id: THIS
style: |
--popup-min-width: 80vw;
--popup-border-color: gray;
--popup-background-color: #101010;
title: Hourly Weather Forecast
content:
type: custom:hourly-weather
entity: weather.openweathermap
name: ""
num_segments: '36'
icons: true
show_date: boundary
show_precipitation_probability: true
show_precipitation_amounts: true
show_wind: false
{{ disable_tap_hold_double_ws(0, 1, 1, 6) }}
###### ### ## ######## ## ## ######## ### ########
## ## ## ## ## ## ### ## ## ## ## ## ## ##
## ## ## ## ## #### ## ## ## ## ## ## ##
## ## ## ## ###### ## ## ## ## ## ## ## ########
## ######### ## ## ## #### ## ## ######### ## ##
## ## ## ## ## ## ## ### ## ## ## ## ## ##
###### ## ## ######## ######## ## ## ######## ## ## ## ##
# CALENDAR
- type: conditional
conditions:
- entity: input_boolean.ui_hide_calendar
state_not: 'on'
elements:
- type: 'custom:atomic-calendar-revive'
entities:
- entity: calendar.kessler_family
name: calendar.kessler_family
- entity: calendar.holidays_in_israel
name: Holidays in Israel
maxDaysToShow: 14
maxEventCount: 6
showLocation: true
showMonth: false
showWeekDay: true
showDate: false
showDescription: false
showNoEventsForToday: false
disableEventLink: true
disableLocationLink: true
defaultMode: Event
refreshInterval: 60
showHours: true
showRelativeTime: false
europeanDate: false
dateFormat: 'LL'
hoursFormat: 'HH:mm'
showMultiDay: false
showMultiDayEventParts: true
style:
left: 30%
top: -1%
width: 20%
transform: 'translate(0%, 0%) scale(1, 0.96)'
## #### ###### ## ## ######## ######
## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ##
## ## ## #### ######### ## ######
## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ##
######## #### ###### ## ## ## ######
# LIGHTS
# ------------------------------
# Define LIGHTS active areas
# ------------------------------
{% for entity, group, left, top, scaleX, scaleY, deg in lights %}
{% if ((loop.index0 == 0) or ((loop.previtem is defined) and (entity != loop.previtem))) %}
- type: image
entity: light.{{ entity }}
image: /local/images/floorplan/transparent_square.png
style:
#border: 1px solid red
width: 3%
left: {{ left }}%
top: {{ top }}%
transform: rotate({{ deg }}deg) scale({{ scaleX }}, {{ scaleY }})
tap_action:
action: toggle
double_tap_action:
action: more-info
hold_action:
{% if entity == "kitchen_table_light" %}
action: fire-dom-event
browser_mod:
service: browser_mod.more_info
data:
browser_id: THIS
style: |
--popup-min-width: 30vw;
--popup-max-width: 30vw;
--popup-border-color: gray;
--popup-background-color: #101010;
entity_id: light.kitchen_table_light_ambilight
{% else %}
action: more-info
{% endif %}
{%- endif %}
{% endfor %}
# ---------------------------
# ---------------------------
# Define Light Group Controls
# ---------------------------
# ---------------------------
{% for entity_group, left, top in light_groups %}
{{ create_warning_background(entity_group ~ "_lights_problem", "light." ~ entity_group ~ "_lights", left, top) }}
- type: state-icon
entity: light.{{ entity_group }}_lights
style:
background-color: {{ background_color }}
border-radius: {{ border_radius }}%
left: {{ left }}%
top: {{ top }}%
transform: translate(-50%, -50%) scale({{ group_scaleX}}, {{ group_scaleY }})
tap_action:
action: toggle
double_tap_action:
action: more-info
hold_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
browser_id: THIS
title: {{ entity_group.capitalize() }} Lights
content:
entities:
{% for entity, group, left, top, scaleX, scaleY, deg in lights %}
{% if ((loop.index0 == 0) or ((loop.previtem is defined) and (entity != loop.previtem))) and (entity_group == group) %}
- light.{{ entity }}
{% endif %}
{% endfor %}
show_header_toggle: false
type: entities
{% endfor %}
###### ####### ## ## ######## ######## ######
## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ##
## ## ## ## ## ###### ######## ######
## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ##
###### ####### ### ######## ## ## ######
# COVERS
# -----------------------------------
# -----------------------------------
# Define COVERS/SHUTTERS active areas
# -----------------------------------
# -----------------------------------
{% for entity, group, left, top, scaleX, scaleY, tap_action in covers %}
{% if ((loop.index0 == 0) or ((loop.previtem is defined) and (entity != loop.previtem))) %}
- type: image
entity: cover.{{ entity }}
state_image:
closed: /local/images/floorplan/shutters/square_closed.png
closing: /local/images/floorplan/shutters/square_closing.png
open: /local/images/floorplan/shutters/square_open.png
opening: /local/images/floorplan/shutters/square_opening.png
style:
#border: 1px solid red
width: 1.6%
left: {{ left }}%
top: {{ top }}%
transform: scale({{ scaleX }}, {{ scaleY }})
tap_action:
action: {{ tap_action }}
double_tap_action:
action: more-info
hold_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
browser_id: THIS
style: |
--popup-min-width: 20vw;
--popup-max-width: 20vw;
--popup-border-color: gray;
--popup-background-color: #101010;
title: Cover
content:
type: 'custom:vertical-slider-cover-card'
title: not_shown
showSidebar: false
panelType: true
switchHeight: 150%
switchColor: closedColor
entities:
- entity: cover.{{ entity }}
{% endif %}
{% endfor %}
# -------------------------------------
# -------------------------------------
# Define Covers/Shutters Group Controls
# -------------------------------------
# -------------------------------------
{% for entity_group, left, top in cover_groups %}
{{ create_warning_background(entity_group ~ "_shutters_problem", "cover." ~ entity_group ~ "_shutters", left, top) }}
{% set services = [('open_cover', 'mdi:arrow-up-bold'), ('stop_cover', 'mdi:stop'), ('close_cover', 'mdi:arrow-down-bold')] %}
{% for service, icon in services %}
- type: state-icon
entity: cover.{{ entity_group }}_shutters
state_color: false
style:
background-color: {{ background_color }}
border-radius: {{ border_radius }}%
{% if service == "open_cover" %}
left: {{ left }}%
{% elif service == "stop_cover" %}
left: {{ left + 2.25 }}%
{% elif service == "close_cover" %}
left: {{ left + 4.5 }}%
{% endif %}
top: {{ top }}%
transform: translate(-50%, -50%) scale({{ group_scaleX }}, {{ group_scaleY }})
tap_action:
action: call-service
service: cover.{{ service }}
service_data:
entity_id: cover.{{ entity_group }}_shutters
double_tap_action:
action: more-info
hold_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
browser_id: THIS
style: |
--popup-min-width: 25vw;
--popup-max-width: 25vw;
--popup-border-color: gray;
--popup-background-color: #101010;
title: {{ entity_group.capitalize() }} Shutters
content:
type: 'custom:vertical-slider-cover-card'
title: not_shown
showSidebar: false
panelType: true
switchHeight: 150%
switchColor: closedColor
entities:
{% for entity, group, left, top, scaleX, scaleY, tap_action in covers %}
{% if ((loop.index0 == 0) or ((loop.previtem is defined) and (entity != loop.previtem))) and (entity_group == group) %}
- entity: cover.{{ entity }}
{% endif %}
{% endfor %}
- type: icon
entity: cover.{{ entity_group }}
icon: {{ icon }}
style:
{% if service == "open_cover" %}
left: {{ left }}%
color: rgb(0, 255, 0)
{% elif service == "stop_cover" %}
left: {{ left + 2.25 }}%
color: yellow
{% elif service == "close_cover" %}
left: {{ left + 4.5 }}%
color: red
{% endif %}
top: {{ top }}%
transform: translate(0%, 0%) scale({{ group_scaleX * 1 }}, {{ group_scaleY * 1 }})
tap_action: # Tap action same as cover icons - so pressing will activate service by either the icon or the overlay
action: call-service
service: cover.{{ service }}
service_data:
entity_id: cover.{{ entity_group }}_shutters
{{ disable_tap_hold_double_ws(0, 1, 1, 4) }}
{% endfor %}
{% endfor %}
#### ######## ######## #### ###### ### ######## #### ####### ## ##
## ## ## ## ## ## ## ## ## ## ## ## ## ## ### ##
## ## ## ## ## ## ## ## ## ## ## ## ## #### ##
## ######## ######## ## ## #### ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ######### ## ## ## ## ## ####
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ###
#### ## ## ## ## #### ###### ## ## ## #### ####### ## ##
# IRRIGATION
# -----------------------------------------------
# -----------------------------------------------
# Define Irrigation Controls & Day_Start_Duration Schedulers
# -----------------------------------------------
# -----------------------------------------------
{% for entity, type, left, top, display_name in irrigation_valves %}
{{ create_warning_background(entity ~ "_problem", type ~ "." ~ entity, left, top) }}
- type: state-icon
entity: {{ type }}.{{ entity }}
style:
background-color: {{ background_color }}
border-radius: {{ border_radius }}%
left: {{ left }}%
top: {{ top }}%
transform: translate(-50%, -50%) scale({{ group_scaleX }}, {{ group_scaleY }})
tap_action:
action: toggle
double_tap_action:
action: more-info
hold_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
browser_id: THIS
style: |
--popup-min-width: 50vw;
--popup-max-width: 50vw;
--popup-border-color: gray;
--popup-background-color: #101010;
title: {{ display_name }} Scheduler
content:
{{ create_schedulers_popup(entity, "DSD") }}
{{ create_schedulers_icons(entity, left, top) }}
- type: conditional
conditions:
- entity: input_boolean.irrigation_future
state: 'on'
- entity: timer.{{ entity }}
state: 'idle'
- entity: input_boolean.{{ entity }}
state: 'on'
elements:
- type: state-label
entity: input_datetime.irrigation_start_time
style:
left: {{ group_irrigation_left }}%
top: {{ group_irrigation_top + timer_top_offset }}%
transform: 'translate(-50%, -50%)'
{{ disable_tap_hold_double_ws(1, 1, 1, 6) }}
- type: conditional
conditions:
- entity: timer.{{ entity }}
state_not: 'idle'
elements:
- type: 'custom:config-template-card'
variables:
SHOW_BAR: states['input_boolean.ui_show_timer_bar_or_time'].state
entities:
- input_boolean.ui_show_timer_bar_or_time
card:
type: custom:timer-bar-card
entity: timer.{{ entity }}
layout: full_row
text_width: "${ SHOW_BAR === 'on' ? '0%' : '100%' }"
style:
width: 2%
left: {{ left }}%
top: {{ top + timer_top_offset }}%
transform: "${ SHOW_BAR === 'on' ? 'translate(-50%, -50%) scale(2, 1)' : 'translate(-50%, -50%) scale(1, 1)' }"
{{ disable_tap_hold_double_ws(0, 1, 1, 6) }}
{% endfor %}
# -------------------------------------
# -------------------------------------
# Define Irrigation Group Controls
# -------------------------------------
# -------------------------------------
- type: state-icon
entity: group.irrigation
style:
background-color: {{ background_color }}
border-radius: {{ border_radius }}%
left: {{ group_irrigation_left }}%
top: {{ group_irrigation_top }}%
transform: translate(-50%, -50%) scale(1, 1)
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
browser_id: THIS
style: |
--popup-min-width: 30vw;
--popup-max-width: 30vw;
--popup-border-color: gray;
--popup-background-color: #101010;
title: Irrigation Valves Manual Cycle
content:
type: grid
columns: 1
square: false