-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathExample Swipe card.yml
188 lines (172 loc) · 5.6 KB
/
Example Swipe card.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
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
# install the custom:swipe-card and custom:button-card from HACS#
# 1.Copy and paste everything from line 15 to 189 into Notepadd++ on a pc #
# 2.To test this out go to Homeassistant settings/helpers #
# 3.Create a new dropdown helper and add 4 options lights,climate,media & blank and name the helper "menu_select" so you should have a new entitiy called "input_select.menu_select" #
# 4.The parts you see below like "light.YOUR_LIGHT" change to one of your entities and repeat on all of them" #
# 5.You may have to delete any line that has a Hashtag on it (they're not important anyway) #
# 6.Once you have changed everything and deleted things create a new "manual" card in home assistant and delete whats in here and copy and paste
# and it should work with 3 cards that swipe and open different cards when clicked on. #
type: vertical-stack
cards:
- type: custom:swipe-card
card_width: 250px
start_card: 3
parameters:
effect: coverflow
grabCursor: true
centeredSlides: true
setWrapperSize: true
slideToClickedSlide: true
slidesPerView: auto
slideShadows: true
coverflowEffect:
rotate: 5
stretch: -5
depth: 150
modifier: 3
slideShadows: true
pagination:
type: none
style:
left: 50%
top: 65%
width: 96%
opacity: 100%
# CARD 1 #
cards:
- type: custom:button-card
entity: light.YOUR_LIGHT
name: Lights
show_entity_picture: true
entity_picture: /local/images/icon/where_ever_your_image_is.png
tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.menu_select
option: lights
double_tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.menu_select
option: blank
styles:
card:
- height: 160px
- padding: 4%
- width: 250px
- border-radius: 25px
- border-width: 2px
- border-color: black
- border-style: solid
# CARD 2 #
- type: custom:button-card
entity: media_player.YOUR_MEDIA_PLAYER
name: Media
show_entity_picture: true
entity_picture: entity_picture: (/local/images/icon/where_ever_your_image_is.png)
tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.menu_select
option: media
double_tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.menu_select
option: blank
styles:
card:
- height: 160px
- padding: 4%
- width: 250px
- border-radius: 25px
- border-width: 2px
- border-color: black
- border-style: solid
# CARD 3 #
- type: custom:button-card
entity: climate.YOUR_THERMOSTAT
name: climate
show_entity_picture: true
entity_picture: /local/images/icon/where_ever_your_image_is.png
tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.menu_select
option: climate
double_tap_action:
action: call-service
service: input_select.select_option
service_data:
entity_id: input_select.menu_select
option: blank
styles:
card:
- height: 160px
- padding: 4%
- width: 250px
- border-radius: 25px
- border-width: 2px
- border-color: black
- border-style: solid
# CONDITIONAL CARDS #
# CONDITIONAL CARD 1 #
- type: conditional
conditions:
- entity: input_select.menu_select
state: lights
card:
type: conditional
conditions:
- entity: input_select.menu_select
state: lights
card:
type: entities
title: Lights
show_header_toggle: false
entities:
- light.YOUR_LIGHTS
- light.YOUR_LIGHTS
- light.YOUR_LIGHTS
- light.YOUR_LIGHTS
# CONDITIONAL CARD 2 #
- type: conditional
conditions:
- entity: input_select.menu_select
state: media
card:
type: entities
entities:
- entity: media_player.YOUR_MEDIA_PLAYER
name: Whatever Name you want
- entity: media_player.YOUR_MEDIA_PLAYER
name: Whatever Name you want
# CONDITIONAL CARD 3 #
- type: conditional
conditions:
- entity: input_select.menu_select
state: Climate
card:
type: thermostat
entity: climate.YOUR_THERMOSTAT
name: Heating
# CONDITIONAL BLANK #
- type: conditional
conditions:
- entity: input_select.menu_select
state: blank
card:
type: custom:button-card
show_name: false
show_icon: false
styles:
card:
- height: 1px
- background: none
- box-shadow: none
- border: none