1 | type: custom:mushroom-template-card |
2 | primary: Máquina de Lavar |
3 | secondary: |- |
4 | |
5 | {% if states('input_select.maqlavar_status') == 'Parada' %} |
6 | Parada |
7 | {% elif states('input_select.maqlavar_status') == 'Centrifugando' %} |
8 | Centrifugando |
9 | {% elif states('input_select.maqlavar_status') == 'Batendo' %} |
10 | Batendo |
11 | {% elif states('input_select.maqlavar_status') == 'Molho' %} |
12 | Molho |
13 | {% elif states('input_select.maqlavar_status') == 'Enchendo' %} |
14 | Enchendo |
15 | {% endif %} |
16 | icon: |- |
17 | {% if states('input_select.maqlavar_status') == 'Batendo' %} |
18 | mdi:tumble-dryer |
19 | {% elif states('input_select.maqlavar_status') == 'Parada' %} |
20 | mdi:washing-machine-off |
21 | {% else %} |
22 | mdi:washing-machine |
23 | {% endif %} |
24 | icon_color: |- |
25 | {% if states('input_select.maqlavar_status') == 'Parada' %} |
26 | #6f6f6f |
27 | {% elif states('input_select.maqlavar_status') == 'Centrifugando' %} |
28 | light-blue |
29 | {% elif states('input_select.maqlavar_status') == 'Batendo' %} |
30 | #fc7b03 |
31 | {% elif states('input_select.maqlavar_status') == 'Molho' %} |
32 | brown |
33 | {% elif states('input_select.maqlavar_status') == 'Enchendo' %} |
34 | blue |
35 | {% endif %} |
36 | entity: input_select.maqlavar_status |
37 | tap_action: |
38 | action: navigate |
39 | navigation_path: /lovelace/fundos |
40 | hold_action: |
41 | action: none |
42 | double_tap_action: |
43 | action: none |
44 | multiline_secondary: false |
45 | layout: vertical |
46 | badge_icon: '' |
47 | badge_color: '' |
48 | card_mod: |
49 | style: | |
50 | ha-state-icon { |
51 | {% if is_state(config.entity, 'Batendo' ) %} |
52 | animation: shake 400ms ease-in-out infinite, drum 1s infinite; |
53 | {% endif %} |
54 | transform-origin: 50% 65%; |
55 | } |
56 | @keyframes shake { |
57 | 0%, 100% { transform: rotate(4deg); } |
58 | 50% { transform: rotate(-4deg); } |
59 | } |
60 | @keyframes drum { |
61 | 50% { clip-path: polygon(0 0, 0 100%, 35% 100%, 36% 74%, 31% 43%, 61% 40%, 71% 69%, 62% 78%, 36% 73%, 35% 100%, 100% 100%, 100% 0); } |
62 | } |
63 | |
64 | ha-state-icon { |
65 | {% if is_state(config.entity, 'Enchendo' ) %} |
66 | animation: shake 400ms ease-in-out infinite, drum 1s infinite; |
67 | {% endif %} |
68 | transform-origin: 50% 65%; |
69 | } |
70 | @keyframes shake { |
71 | 0%, 100% { transform: rotate(4deg); } |
72 | 50% { transform: rotate(-4deg); } |
73 | } |
74 | @keyframes drum { |
75 | 50% { clip-path: polygon(0 0, 0 100%, 35% 100%, 36% 74%, 31% 43%, 61% 40%, 71% 69%, 62% 78%, 36% 73%, 35% 100%, 100% 100%, 100% 0); } |
76 | } |
77 | |
78 | ha-state-icon { |
79 | {% if is_state(config.entity, 'Retirando Água' ) %} |
80 | animation: shake 400ms ease-in-out infinite, drum 1s infinite; |
81 | {% endif %} |
82 | transform-origin: 50% 65%; |
83 | } |
84 | @keyframes shake { |
85 | 0%, 100% { transform: rotate(4deg); } |
86 | 50% { transform: rotate(-4deg); } |
87 | } |
88 | @keyframes drum { |
89 | 50% { clip-path: polygon(0 0, 0 100%, 35% 100%, 36% 74%, 31% 43%, 61% 40%, 71% 69%, 62% 78%, 36% 73%, 35% 100%, 100% 100%, 100% 0); } |
90 | } |
91 | |
92 | ha-state-icon { |
93 | {% if is_state(config.entity, 'Centrifugando' ) %} |
94 | animation: shake 400ms ease-in-out infinite, drum 1s infinite; |
95 | {% endif %} |
96 | transform-origin: 50% 65%; |
97 | } |
98 | @keyframes shake { |
99 | 0%, 100% { transform: rotate(4deg); } |
100 | 50% { transform: rotate(-4deg); } |
101 | } |
102 | @keyframes drum { |
103 | 50% { clip-path: polygon(0 0, 0 100%, 35% 100%, 36% 74%, 31% 43%, 61% 40%, 71% 69%, 62% 78%, 36% 73%, 35% 100%, 100% 100%, 100% 0); } |
104 | } |