It consist of a few items.
First when your harmony hub is connected to HA it makes a file harmony_living_room.conf (living_room depends on the name in configuration.yaml).
Basically it contains all items you learned to the harmony hub.
{
"Activities": {
"-1": "PowerOff",
"41444235": "Watch TV"
},
"Devices": {
"Dyon Satellite Receiver": {
"commands": [
"PowerToggle",
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"Mute",
"VolumeDown",
"VolumeUp",
"ChannelPrev",
"ChannelDown",
"ChannelUp",
"DirectionDown",
"DirectionLeft",
"DirectionRight",
"DirectionUp",
"Select",
"Stop",
"Play",
"Rewind",
"Eject",
"Pause",
"FastForward",
"Record",
"SkipBack",
"SkipForward",
"Menu",
"Teletext",
"Green",
"Red",
"Blue",
"Yellow",
"Guide",
"Info",
"Exit",
"Goto",
"Source",
"Tv/Radio"
],
"id": "65490326"
},
"Google Chromecast": {
"commands": [],
"id": "65490322"
},
"Philips Mini System": {
"commands": [
"PowerToggle",
"Mute",
"VolumeDown",
"VolumeUp",
"OK",
"Stop",
"Play",
"Pause",
"Menu",
"Timer",
"Program",
"PresetPrev",
"Scan",
"PresetNext",
"Sleep",
"Info",
"AlbumDown",
"AlbumUp",
"Clock",
"Dim",
"InputAudioIn/Usb",
"InputBluetooth",
"InputCd",
"InputFm/Dab",
"Mode",
"Pairing",
"Sound"
],
"id": "65490324"
},
"Samsung TV": {
"commands": [
"PowerOff",
"PowerOn",
"PowerToggle",
"-",
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"Mute",
"VolumeDown",
"VolumeUp",
"ChannelPrev",
"ChannelDown",
"ChannelUp",
"DirectionDown",
"DirectionLeft",
"DirectionRight",
"DirectionUp",
"Select",
"Stop",
"Play",
"Rewind",
"Pause",
"FastForward",
"Record",
"Return",
"Menu",
"Subtitle",
"Teletext",
"C",
"B",
"D",
"A",
"Search",
"Green",
"Red",
"Blue",
"Yellow",
"Guide",
"Info",
"Exit",
"Aspect",
"AD",
"ChannelList",
"DualI-II",
"FamilyStory",
"HDMI",
"InputAv",
"InputComponent",
"InputExt",
"InputHdmi1",
"InputHdmi2",
"InputHdmi3",
"InputTv",
"InputUsb",
"SmartHub",
"Source",
"Support",
"Tools"
],
"id": "65490323"
},
"arcadyan DVR": {
"commands": [
"PowerToggle",
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"ChannelPrev",
"ChannelDown",
"ChannelUp",
"DirectionDown",
"DirectionLeft",
"DirectionRight",
"DirectionUp",
"Select",
"Stop",
"Play",
"Rewind",
"Pause",
"FastForward",
"Record",
"Menu",
"Teletext",
"DVR",
"Green",
"Red",
"Blue",
"Yellow",
"Guide",
"Info",
"Exit",
"Radio",
"TV"
],
"id": "65490325"
}
}
}
As you see it contains the Samsung TV (as well KPN / XS4ALL tv receiver.
Make a scripts file that contains:
# Harmony
# Turn Activity Watch TV On
watch_tv_activity_on:
alias: Start Watching TV
sequence:
- service: remote.turn_on
entity_id: remote.living_room
data:
activity: 'Watch TV'
watch_tv_activity_off:
alias: Stop Watching TV
sequence:
- service: remote.turn_off
entity_id: remote.living_room
data:
activity: 'Watch TV'
#
# Samsung TV
tv_power_on:
alias: On
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: PowerOn
device: Samsung TV
#
tv_power_off:
alias: Off
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: PowerOff
device: Samsung TV
#
tv_power_toggle:
alias: On
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: PowerToggle
device: Samsung TV
#
tv_mute_audio:
alias: Mute Audio
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: Mute
device: Samsung TV
#
tv_audio_volume_up:
alias: Volume Up
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: VolumeUp
device: Samsung TV
#
tv_audio_volume_down:
alias: Volume Down
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: VolumeDown
device: Samsung TV
#
tv_hdmi_1:
alias: HDMI 1
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: InputHdmi1
device: Samsung TV
#
tv_hdmi_2:
alias: HDMI 2
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: InputHdmi2
device: Samsung TV
#
tv_hdmi_3:
alias: HDMI 3
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: InputHdmi3
device: Samsung TV
#
tv_input:
alias: Digitenne
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: InputTv
device: Samsung TV
#
# DVB SetTop Box
#
dvb_power_toggle:
alias: Power Toggle
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: PowerToggle
device: arcadyan DVR
#
dvb_menu:
alias: Menu
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: Menu
device: arcadyan DVR
#
dvb_select:
alias: Select
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: Select
device: arcadyan DVR
#
dvb_guide:
alias: Guide
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: Guide
device: arcadyan DVR
#
dvb_left:
alias: Left
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: DirectionLeft
device: arcadyan DVR
#
dvb_right:
alias: Right
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: DirectionRight
device: arcadyan DVR
#
dvb_up:
alias: Up
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: DirectionUp
device: arcadyan DVR
#
dvb_down:
alias: Down
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: DirectionDown
device: arcadyan DVR
#
dvb_channel_up:
alias: Channel Up
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: ChannelUp
device: arcadyan DVR
#
dvb_channel_down:
alias: Channel Down
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: ChannelDown
device: arcadyan DVR
#
dvb_channel_prev:
alias: Previous Channel
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: ChannelPrev
device: arcadyan DVR
#
dvb_number_1:
alias: 1
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: 1
device: arcadyan DVR
#
dvb_number_2:
alias: 2
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: 2
device: arcadyan DVR
#
dvb_number_3:
alias: 3
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: 3
device: arcadyan DVR
#
dvb_number_4:
alias: 4
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: 4
device: arcadyan DVR
#
dvb_number_5:
alias: 5
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: 5
device: arcadyan DVR
#
dvb_number_6:
alias: 6
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: 6
device: arcadyan DVR
#
dvb_number_7:
alias: 7
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: 7
device: arcadyan DVR
#
dvb_number_8:
alias: 8
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: 8
device: arcadyan DVR
#
dvb_number_9:
alias: 9
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: 9
device: arcadyan DVR
#
dvb_radio:
alias: Radio
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: radio
device: arcadyan DVR
#
dvb_number_0:
alias: 0
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: 0
device: arcadyan DVR
#
dvb_tv:
alias: TV
sequence:
- service: remote.send_command
entity_id: remote.living_room
data:
command: tv
device: arcadyan DVR
#
SInce I use the settop box, I left out the numeric of the Samsung TV, only needed HDMI.
Next make a custom card with data":
cards:
- content: Samsung TV
type: markdown
- cards:
- entity: script.tv_power_on
icon: 'mdi:television'
name: 'On'
tap_action:
action: toggle
type: entity-button
- entity: script.tv_power_off
icon: 'mdi:power'
name: 'Off'
tap_action:
action: toggle
type: entity-button
type: horizontal-stack
- cards:
- entity: script.tv_audio_volume_down
icon: 'mdi:volume-minus'
tap_action:
action: toggle
type: entity-button
- entity: script.tv_mute_audio
icon: 'mdi:volume-mute'
tap_action:
action: toggle
type: entity-button
- entity: script.tv_audio_volume_up
icon: 'mdi:volume-plus'
tap_action:
action: toggle
type: entity-button
type: horizontal-stack
- cards:
- entity: script.tv_hdmi_1
icon: 'mdi:television'
tap_action:
action: toggle
type: entity-button
- entity: script.tv_hdmi_2
icon: 'mdi:television'
tap_action:
action: toggle
type: entity-button
- entity: script.tv_hdmi_3
icon: 'mdi:television'
tap_action:
action: toggle
type: entity-button
type: horizontal-stack
type: vertical-stack
I did choose a vertical stack and your good to go.
Since this is a long post, this is the vertical stack of my KPN settop box…
cards:
- content: KPN / XS4ALL
type: markdown
- cards:
- entity: script.tv_power_toggle
icon: 'mdi:television'
name: TV On/Off
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_power_toggle
icon: 'mdi:power'
name: DVB On/Off
tap_action:
action: toggle
type: entity-button
type: horizontal-stack
- cards:
- entity: script.dvb_menu
icon: 'mdi:menu'
name: Menu
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_select
icon: 'mdi:check'
name: Ok
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_guide
icon: 'mdi:map-search'
name: Gids
tap_action:
action: toggle
type: entity-button
type: horizontal-stack
- cards:
- entity: script.dvb_left
icon: 'mdi:arrow-left'
name: Links
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_right
icon: 'mdi:arrow-right'
name: Rechts
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_up
icon: 'mdi:arrow-up'
name: Omhoog
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_down
icon: 'mdi:arrow-down'
name: Omlaag
tap_action:
action: toggle
type: entity-button
type: horizontal-stack
- cards:
- entity: script.dvb_channel_up
icon: 'mdi:minus'
name: Channel Down
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_channel_prev
icon: 'mdi:redo'
name: Last Channel
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_channel_up
icon: 'mdi:plus'
name: Channel Up
tap_action:
action: toggle
type: entity-button
type: horizontal-stack
- cards:
- entity: script.dvb_number_1
icon: 'mdi:numeric-1'
name: ';@?! '
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_number_2
icon: 'mdi:numeric-2'
name: abc
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_number_3
icon: 'mdi:numeric-3'
name: def
tap_action:
action: toggle
type: entity-button
type: horizontal-stack
- cards:
- entity: script.dvb_number_4
icon: 'mdi:numeric-4'
name: ghi
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_number_5
icon: 'mdi:numeric-5'
name: jkl
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_number_6
icon: 'mdi:numeric-6'
name: 'mno '
tap_action:
action: toggle
type: entity-button
type: horizontal-stack
- cards:
- entity: script.dvb_number_7
icon: 'mdi:numeric-7'
name: pqrs
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_number_8
icon: 'mdi:numeric-8'
name: tuv
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_number_9
icon: 'mdi:numeric-9'
name: wxyz
tap_action:
action: toggle
type: entity-button
type: horizontal-stack
- cards:
- entity: script.dvb_radio
icon: 'mdi:radio'
name: Radio
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_number_0
icon: 'mdi:numeric-0'
name: _
tap_action:
action: toggle
type: entity-button
- entity: script.dvb_tv
icon: 'mdi:television'
name: TV
tap_action:
action: toggle
type: entity-button
type: horizontal-stack
type: vertical-stack
Hope this helps you out.