-
Notifications
You must be signed in to change notification settings - Fork 677
/
Copy pathsovrum_tv2.yaml
85 lines (77 loc) · 2.41 KB
/
sovrum_tv2.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
action: fire-dom-event
browser_mod:
command: popup
title: Sovrum Tv
style:
hui-vertical-stack-card:
$: |
hui-horizontal-stack-card {
padding: 0em 2em 2.3em 2em;
}
$hui-horizontal-stack-card$: |
#root {
justify-content: space-evenly;
}
$hui-entities-card$more-info-card:
$ha-card:
.: |
h1, state-card-content {
display: none;
}
.card-content {
padding: {{ is_state('media_player.samsung', 'off') | iif('0', '1.2em 0 0.5em 0') }};
}
more-info-media_player$: |
div.volume, div.controls {
display: none;
}
card:
type: vertical-stack
cards:
- type: entities
state_color: true
show_header_toggle: false
card_mod:
class: content
entities:
- entity: media_player.samsung
name: Samsung TV
secondary_info: last-changed
- entity: script.samsung_tv_energy_saving
- entity: script.bedroom_tv_night
- type: custom:more-info-card
entity: media_player.samsung
- type: horizontal-stack
cards:
- type: custom:button-card
entity: media_player.samsung
icon: mdi:volume-mute
tap_action:
action: call-service
service: media_player.volume_mute
service_data:
entity_id: >
[[[ return entity.entity_id; ]]]
is_volume_muted: >
[[[ return entity.attributes.is_volume_muted === 'false' ? 'true' : 'false'; ]]]
template: icon_only
- type: custom:button-card
entity: media_player.samsung
icon: mdi:volume-minus
tap_action:
action: call-service
service: media_player.volume_down
service_data:
entity_id: >
[[[ return entity.entity_id; ]]]
template: icon_only
- type: custom:button-card
entity: media_player.samsung
icon: mdi:volume-plus
tap_action:
action: call-service
service: media_player.volume_up
service_data:
entity_id: >
[[[ return entity.entity_id; ]]]
template: icon_only