AV Remote Card
This card utilizes the built-in glance lovelace card to create a remote that fires commands from your harmony hub.
This card requires you to install and setup the following components:
Once harmony is set up, open [HUB_NAME].conf (located at the root of your config folder). Here you will find a listing of all the devices and the commands they can issue. Each device starts with something like: 53209424 - LG TV. The number on the left is the device code for that device. You will utilize tap_action to send the command. A service block looks like this:
1
service_data:
2
"entity_id": "remote.joehubz"
3
"device": "53209424"
4
"command": "Mute"
Copied!
Swap your device code and command name to customize for your AV setup.
Finally, switch out the entity for some dormant binary sensor in your system. In the example below, I used my front_door sensor.
Change the icons and device codes to your own.
If you are still able to "Configure UI" you can drop the code into a new card. If you have taken full manual control, you can !include the remote file. (shown below)
ui-lovelace.yaml
1
# if you have taken manual control
2
- type: glance
3
cards: !include remotes/lg.yaml
Copied!
remotes/lg.yaml
1
type: glance
2
title: LG Remote
3
show_state: false
4
entities:
5
6
# power row
7
- entity: binary_sensor.front_door
8
icon: mdi:power
9
name: ' '
10
tap_action:
11
action: call-service
12
service: media_player.toggle
13
service_data:
14
entity_id: media_player.lg_tv
15
- entity: binary_sensor.front_door
16
icon: mdi:web
17
name: ' '
18
tap_action:
19
action: call-service
20
service: media_player.select_source
21
service_data:
22
entity_id: media_player.lg_tv
23
source: "Web Browser"
24
- entity: binary_sensor.front_door
25
icon: mdi:netflix
26
name: ' '
27
tap_action:
28
action: call-service
29
service: media_player.select_source
30
service_data:
31
entity_id: media_player.lg_tv
32
source: "Netflix"
33
- entity: binary_sensor.front_door
34
icon: mdi:television-box
35
name: ' '
36
tap_action:
37
action: call-service
38
service: media_player.select_source
39
service_data:
40
entity_id: media_player.lg_tv
41
source: "Tivo"
42
- entity: binary_sensor.front_door
43
icon: mdi:playstation
44
name: ' '
45
tap_action:
46
action: call-service
47
service: media_player.select_source
48
service_data:
49
entity_id: media_player.lg_tv
50
source: "Onkyo"
51
52
53
# top row
54
- entity: binary_sensor.front_door
55
icon: mdi:volume-off
56
name: ' '
57
tap_action:
58
action: call-service
59
service: remote.send_command
60
service_data:
61
"entity_id": "remote.joehubz"
62
"device": "53209424"
63
"command": "Mute"
64
- entity: binary_sensor.front_door
65
icon: mdi:home
66
name: ' '
67
tap_action:
68
action: call-service
69
service: remote.send_command
70
service_data:
71
"entity_id": "remote.joehubz"
72
"device": "59364597"
73
"command": "Home"
74
- entity: binary_sensor.front_door
75
icon: mdi:chevron-up-box-outline
76
name: ' '
77
tap_action:
78
action: call-service
79
service: remote.send_command
80
service_data:
81
"entity_id": "remote.joehubz"
82
"device": "53209424"
83
"command": "DirectionUp"
84
- entity: binary_sensor.front_door
85
icon: mdi:play-pause
86
name: ' '
87
tap_action:
88
action: call-service
89
service: remote.send_command
90
service_data:
91
"entity_id": "remote.joehubz"
92
"device": "53209424"
93
"command": "Pause"
94
- entity: binary_sensor.front_door
95
icon: mdi:stop
96
name: ' '
97
tap_action:
98
action: call-service
99
service: remote.send_command
100
service_data:
101
"entity_id": "remote.joehubz"
102
"device": "59364597"
103
"command": "Stop"
104
105
106
# middle row
107
- entity: binary_sensor.front_door
108
icon: mdi:volume-plus
109
name: ' '
110
tap_action:
111
action: call-service
112
service: media_player.volume_up
113
service_data:
114
entity_id: media_player.lg_tv
115
- entity: binary_sensor.front_door
116
icon: mdi:chevron-left-box-outline
117
name: ' '
118
tap_action:
119
action: call-service
120
service: remote.send_command
121
service_data:
122
"entity_id": "remote.joehubz"
123
"device": "53209424"
124
"command": "DirectionLeft"
125
- entity: binary_sensor.front_door
126
icon: mdi:checkbox-blank-circle-outline
127
name: ' '
128
tap_action:
129
action: call-service
130
service: remote.send_command
131
service_data:
132
"entity_id": "remote.joehubz"
133
"device": "53209424"
134
"command": "OK"
135
- entity: binary_sensor.front_door
136
icon: mdi:chevron-right-box-outline
137
name: ' '
138
tap_action:
139
action: call-service
140
service: remote.send_command
141
service_data:
142
"entity_id": "remote.joehubz"
143
"device": "53209424"
144
"command": "DirectionRight"
145
- entity: binary_sensor.front_door
146
icon: mdi:rewind
147
name: ' '
148
tap_action:
149
action: call-service
150
service: remote.send_command
151
service_data:
152
entity_id: remote.joehubz
153
device: '59364597'
154
command: Rewind
155
156
157
# bottom row
158
- entity: binary_sensor.front_door
159
icon: mdi:volume-minus
160
name: ' '
161
tap_action:
162
action: call-service
163
service: media_player.volume_down
164
service_data:
165
entity_id: media_player.lg_tv
166
- entity: binary_sensor.front_door
167
icon: mdi:undo
168
name: ' '
169
tap_action:
170
action: call-service
171
service: remote.send_command
172
service_data:
173
entity_id: "remote.joehubz"
174
device: "59364597"
175
command: "Back"
176
- entity: binary_sensor.front_door
177
icon: mdi:chevron-down-box-outline
178
name: ' '
179
tap_action:
180
action: call-service
181
service: remote.send_command
182
service_data:
183
"entity_id": "remote.joehubz"
184
"device": "53209424"
185
"command": "DirectionDown"
186
- entity: binary_sensor.front_door
187
icon: mdi:redo
188
name: ' '
189
tap_action:
190
action: call-service
191
service: remote.send_command
192
service_data:
193
"entity_id": "remote.joehubz"
194
"device": "59364597"
195
"command": "SkipForward"
196
- entity: binary_sensor.front_door
197
icon: mdi:fast-forward
198
name: ' '
199
tap_action:
200
action: call-service
201
service: remote.send_command
202
service_data:
203
"entity_id": "remote.joehubz"
204
"device": "59364597"
205
"command": "FastForward"
Copied!
Last modified 1yr ago
Copy link