-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMacbook Pro card
145 lines (142 loc) · 4.65 KB
/
Macbook Pro card
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
type: conditional
conditions:
- entity: binary_sensor.conors_macbook_pro_active
state: 'on'
card:
type: custom:stack-in-card
keep:
outer_padding: true
border-radius: true
box_shadow: false
background: false
margin: false
cards:
- type: custom:mushroom-title-card
title: ' 💻 Macbook Pro'
- type: custom:stack-in-card
mode: vertical
cards:
- type: custom:stack-in-card
mode: horizontal
cards:
- type: custom:mushroom-entity-card
entity: sensor.conors_macbook_pro_internal_battery_level
use_entity_picture: true
layout: horizontal
name: Battery
icon_color: green
card_mod:
style: |
ha-card:active {
transform: scale(0.975);
transition: 0s;
}
- type: custom:mushroom-entity-card
entity: script.macbook_pro_sleep
use_entity_picture: true
layout: horizontal
name: Sleep
icon: mdi:power-sleep
tap_action:
action: call-service
service: script.macbook_pro_sleep
card_mod:
style: |
ha-card:active {
transform: scale(0.975);
transition: 0s;
}
- type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
entity: number.macbook_pro_volume
tap_action:
action: null
icon: >
{% set vol_level = states(entity) | float %}
{% if (vol_level == 0) or is_state('switch.macbook_pro_mute',
'on') %}
mdi:volume-mute
{% elif vol_level > 50 %}
mdi:volume-high
{% elif vol_level < 10 %}
mdi:volume-low
{% else %}
mdi:volume-medium
{% endif %}
badge_icon: ''
icon_color: |
{% if is_state("switch.macbook_pro_mute", "on") %}
red
{% else %}
green
{% endif %}
primary: Volume
secondary: |
{% set vol = states(entity) | float %}
{{ vol | round | int }}%
- type: custom:my-slider
entity: number.macbook_pro_volume
radius: 12px
height: 20px
mainSliderColor: rgb(var(--mush-rgb-indigo))
secondarySliderColor: rgba(var(--mush-rgb-indigo), 0.2)
mainSliderColorOff: rgb(var(--mush-rgb-disabled))
secondarySliderColorOff: rgba(var(--mush-rgb-disabled), 0.2)
thumbHorizontalPadding: 0px
thumbVerticalPadding: 0px
thumbWidth: 0px
card_mod:
style: |
ha-card {
padding: 0px 11px 11px;
--mush-rgb-disabled: 189,189,189;
--mush-rgb-indigo: 63, 81, 181;
}
- type: custom:mushroom-template-card
primary: ''
secondary: ''
icon: |
{% set vol_level = states(entity) | float %}
{% if vol_level == 0 %}
mdi:volume-mute
{% elif vol_level > 50 %}
mdi:volume-high
{% elif vol_level < 0.33 %}
mdi:volume-low
{% else %}
mdi:volume-medium
{% endif %}
badge_icon: ''
icon_color: |
{% if is_state("switch.macbook_pro_mute", "on") %}
red
{% else %}
green
{% endif %}
entity: switch.macbook_pro_mute
card_mod:
style: |-
ha-card {
margin-top: -97px;
margin-left: 00px;
}
title: null
direction: right
height: 25
positions:
icon: inside
indicator: 'off'
name: inside
minmax: 'off'
value: inside
severity:
- from: '80'
to: '100'
color: Red
- from: '70'
to: '79'
color: Orange
- from: '0'
to: '69'
color: Green