-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschool_cycle_days_dashboard.yml
112 lines (98 loc) · 3.93 KB
/
school_cycle_days_dashboard.yml
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
views:
- type: sections
max_columns: 2
icon: mdi:chair-school
path: cycle-days
title: School Cycle Days
sections:
- type: grid
cards:
- type: markdown
content: '{{ states(''input_text.system_message'') }} '
title: System Message
visibility:
- condition: state
entity: input_text.system_message
state_not: unknown
- condition: and
conditions:
- condition: state
entity: input_text.system_message
state_not: ''
- type: entities
entities:
- entity: input_datetime.add_non_school_day
name: Add Day
- entity: input_button.add_non_school_day
- type: divider
- entity: input_select.non_school_days
name: Delete Non-School Day
- entity: input_button.delete_non_school_day
name: Delete Selected Day
- entity: input_button.clear_non_school_days
name: Clear All Non School Days
- type: divider
- entity: input_button.cycle_day_list_holidays
name: Add all holidays
- entity: input_button.delete_holidays
name: Delete all holidays
- type: divider
- entity: input_button.refresh_calendar_list
- entity: input_select.calendar_list
- entity: input_button.add_dates_from_other_calendar
title: Non School Days
- type: entities
entities:
- entity: input_datetime.cycle_start_day
- entity: input_datetime.cycle_end_day
- entity: input_number.cycle_day_restart_day
- entity: input_text.cycle_day_1
- entity: input_text.cycle_day_2
- entity: input_text.cycle_day_3
- entity: input_text.cycle_day_4
- entity: input_text.cycle_day_5
- type: divider
- entity: input_button.rerun_calendar_cycle_days
- entity: input_button.delete_calendar_events
title: Cycle Days
- type: grid
cards:
- type: markdown
content: >-
#### These days will be added to the holidays.
{% if state_attr('input_text.non_school_days', 'No school days')
is not none %}
{% set list_of_non_school_days =
state_attr('input_text.non_school_days', 'No school days') |
replace("'", "") | replace("[","") | replace("]","") | replace("
","") %}
{% set list_of_non_school_days =
list_of_non_school_days.split(',') %}
{% for item in list_of_non_school_days %}
{% if item != "None" and item !=""%}
* {{item}}
{% endif %}
{%- endfor %}
{% endif %}
title: Non-School Days
visibility:
- condition: state
entity: input_text.non_school_days
state_not: ''
- condition: and
conditions:
- condition: state
entity: input_text.non_school_days
state_not: ''
- type: markdown
content: >-
#### Holidays will be added to non-school days.
{% if state_attr('input_text.cycle_day_holidays', 'Holidays') is
not none %}
{% for item in state_attr('input_text.cycle_day_holidays',
'Holidays') %}
* {{item | replace("'", "") | replace("[","") | replace("]","") }}
{%- endfor %}
{% endif %}
title: Holidays
cards: []