Please note that device must be specified (because of validation) but is not used by this platform. So you may specify any value.
name (Required): The hub’s name to display in the frontend.
host (Optional): The Harmony device’s IP address. Leave empty for the IP to be discovered automatically.
port (Optional): The Harmony device’s port. Defaults to 5222.
-
activity (Optional): Activity to use when turnon service is called without any data.
+
activity (Optional): Activity to use when turn_on service is called without any data.
delay_secs (Optional): Default duration in seconds between sending commands to a device.
Configuration file:
@@ -116,28 +116,115 @@ set for your Hub so the platform knows what Hub you are trying to configure.
List of all programmed device names and ID numbers
List of all available commands per programmed device
-
Supported services:
-
-
Turn Off: Turn off all devices that were switched on from the start of the current activity.s
-
Turn On: Start an activity, will start the default activity from configuration.yaml if no activity is specified. The specified activity can either be the activity name or the activity ID from the configuration file written to your Home Assistant configuration directory.
-
Send Command: Send a single command or a set of commands to one device, device ID and available commands are written to the configuration file at startup. You can optionally specify the number of times you wish to repeat the command(s) and delay you want between repeated command(s).
-
Sync: Synchronizes the Harmony device with the Harmony web service if any changes are made from the web portal or app.
-
-
Examples
-
A template switch can be used to display and control the state of an activity in the frontend.
Turn off all devices that were switched on from the start of the current activity.
+
+
+
+
Service data attribute
+
Optional
+
Description
+
+
+
+
+
entity_id
+
yes
+
Only act on a specific remote, else target all.
+
+
+
+
Service remote.turn_on
+
Start an activity. Will start the default activity from configuration.yaml if no activity is specified. The specified activity can either be the activity name or the activity ID from the configuration file written to your Home Assistant configuration directory.
+
+
+
+
Service data attribute
+
Optional
+
Description
+
+
+
+
+
entity_id
+
yes
+
Only act on a specific remote, else target all.
+
+
+
activity
+
yes
+
Activity ID or Activity Name to start.
+
+
+
+
Service remote.send_command
+
Send a single command or a set of commands to one device, device ID and available commands are written to the configuration file at startup. You can optionally specify the number of times you wish to repeat the command(s) and delay you want between repeated command(s).
+
+
+
+
Service data attribute
+
Optional
+
Description
+
+
+
+
+
entity_id
+
yes
+
Only act on a specific remote, else target all.
+
+
+
device
+
no
+
Device ID to send the command to.
+
+
+
command
+
no
+
A single command or a list of commands to send.
+
+
+
num_repeats
+
yes
+
The number of times to repeat the command(s).
+
+
+
delay_secs
+
yes
+
The number of seconds between sending each command.
+
+
+
+
A typical service call for sending several button presses looks like this:
Synchronize the Harmony device with the Harmony web service if any changes are made from the web portal or app.
+
+
+
+
Service data attribute
+
Optional
+
Description
+
+
+
+
+
entity_id
+
yes
+
Only act on a specific remote, else target all.
+
+
+
+
Examples
Template sensors can be utilized to display current activity in the frontend.
sensor:-platform:template
@@ -174,40 +261,6 @@ set for your Hub so the platform knows what Hub you are trying to configure.
entity_id:input_boolean.notify
-
The automation example below shows how to send a command via the harmony remote using the send_command service to send the ‘Pause’ command to the hub, which is already defined as an IR code for each device to be used via the Harmony app. It is checking for the activity name as exposed through the sensor in the harmony remote component using Jinja if statements to set the device_id, sending the correct Pause command for the given activity. This requires checking your activity list and device_id from the harmony_REMOTENAME.conf file created when you start the component. In this example, the harmony hub is named bedroom.
-
automation:
- -alias:Harmony Pause contextual for activity
- trigger:
- # trigger happens to be from a flic button - could be any valid event
- platform:event
- event_type:flic_click
- event_data:
- button_name:flic_80e4da70bbb1
- click_type:double
- action:
- service:remote.send_command
- data_template:
- # using a data template to have if brances for relevant device
- # Always the same entity_id - the harmony hub
- entity_id:remote.bedroom
- # Always the same command - the Pause key
- command:Pause
- # select device based upon the activity being undertaken.
- device:>
- # when in WATCH TV activity, the pause key relates to a TiVo, which is device 22987101
- {% if is_state("sensor.bedroom", "WATCH TV") %}{% raw %}
- 22987101
- # when in WATCH APPLE TV activity, the pause key relates to an Apple TV, which is device 23002316
- {% raw %}{% elif is_state("sensor.bedroom", "WATCH APPLE TV") %}
- 23002316
- {% elif is_state("sensor.bedroom", "PLEX") %}
- 23048786
- {% elif is_state("sensor.bedroom", "WATCH BLU RAY") %}
- 23043122
- {% endif %}
-
-