You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_components/remote.harmony.markdown
+45-56Lines changed: 45 additions & 56 deletions
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ Configuration variables:
53
53
- **name** (*Required*): The hub's name to display in the frontend.
54
54
- **host** (*Optional*): The Harmony device's IP address. Leave empty for the IP to be discovered automatically.
55
55
- **port** (*Optional*): The Harmony device's port. Defaults to 5222.
56
-
- **activity** (*Optional*): Activity to use when turnon service is called without any data.
56
+
- **activity** (*Optional*): Activity to use when `turn_on` service is called without any data.
57
57
- **delay_secs** (*Optional*): Default duration in seconds between sending commands to a device.
58
58
59
59
Configuration file:
@@ -64,32 +64,58 @@ Upon startup one file will be written to your Home Assistant configuration direc
64
64
- List of all programmed device names and ID numbers
65
65
- List of all available commands per programmed device
66
66
67
-
Supported services:
67
+
### {% linkable_title Service `remote.turn_off` %}
68
68
69
-
- **Turn Off**: Turn off all devices that were switched on from the start of the current activity.s
70
-
- **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](/docs/configuration/).
71
-
- **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).
72
-
- **Sync**: Synchronizes the Harmony device with the Harmony web service if any changes are made from the web portal or app.
69
+
Turn off all devices that were switched on from the start of the current activity.
73
70
71
+
| Service data attribute | Optional | Description |
| `entity_id` | yes | Only act on a specific remote, else target all.
74
74
75
-
### {% linkable_title Examples %}
75
+
### {% linkable_title Service `remote.turn_on` %}
76
+
77
+
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](/docs/configuration/).
78
+
79
+
| Service data attribute | Optional | Description |
| `entity_id` | yes | Only act on a specific remote, else target all.
82
+
| `activity` | yes | Activity ID or Activity Name to start.
83
+
84
+
### {% linkable_title Service `remote.send_command` %}
85
+
86
+
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).
87
+
88
+
| Service data attribute | Optional | Description |
| `entity_id` | yes | Only act on a specific remote, else target all.
116
+
117
+
### {% linkable_title Examples %}
118
+
93
119
Template sensors can be utilized to display current activity in the frontend.
94
120
95
121
```yaml
@@ -104,7 +130,6 @@ sensor:
104
130
friendly_name: 'bedroom'
105
131
```
106
132
107
-
108
133
The example below shows how to control an `input_boolean` switch using the Harmony remote's current activity. The switch will turn on when the remote's state changes and the Kodi activity is started and off when the remote's state changes and the current activity is PowerOff.
109
134
110
135
```yaml
@@ -130,39 +155,3 @@ automation:
130
155
service: input_boolean.turn_off
131
156
entity_id: input_boolean.notify
132
157
````
133
-
134
-
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.
135
-
136
-
```yaml
137
-
automation:
138
-
- alias: Harmony Pause contextual for activity
139
-
trigger:
140
-
# trigger happens to be from a flic button - could be any valid event
141
-
platform: event
142
-
event_type: flic_click
143
-
event_data:
144
-
button_name: flic_80e4da70bbb1
145
-
click_type: double
146
-
action:
147
-
service: remote.send_command
148
-
data_template:
149
-
# using a data template to have if brances for relevant device
150
-
# Always the same entity_id - the harmony hub
151
-
entity_id: remote.bedroom
152
-
# Always the same command - the Pause key
153
-
command: Pause
154
-
# select device based upon the activity being undertaken.
155
-
device: >
156
-
# when in WATCH TV activity, the pause key relates to a TiVo, which is device 22987101
157
-
{% raw %}{% if is_state("sensor.bedroom", "WATCH TV") %}{% raw %}
158
-
22987101
159
-
# when in WATCH APPLE TV activity, the pause key relates to an Apple TV, which is device 23002316
160
-
{% raw %}{% elif is_state("sensor.bedroom", "WATCH APPLE TV") %}{% endraw %}
161
-
23002316
162
-
{% raw %}{% elif is_state("sensor.bedroom", "PLEX") %}{% endraw %}
Copy file name to clipboardExpand all lines: source/_components/remote.itach.markdown
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ Configuration variables:
48
48
- **name** (*Required*): Command name.
49
49
- **data** (*Required*): Hex command data.
50
50
51
-
An example to call the component from developer tools using the remote, send_command service `{ "entity_id":"remote.tv", "device":"0", "command":"menu" }`
51
+
An example to call the component from developer tools using the `remote.send_command` service: `{ "entity_id":"remote.tv", "command":"menu" }`
52
52
53
53
Note: Global Cache devices expect data in their own format of "sendir...". This component converts hex code to Global Cache IR form.
0 commit comments