From d032beb948aa6bdf9dc442049d7f759709dab901 Mon Sep 17 00:00:00 2001 From: Nick Whyte Date: Tue, 19 May 2020 23:57:47 +1000 Subject: [PATCH] Add doc for homekit TV remote key press event (#11382) * Add doc for homekit TV remote key press event * Update source/_integrations/homekit.markdown Co-authored-by: J. Nick Koston * :pencil2: Tweak Co-authored-by: J. Nick Koston Co-authored-by: Klaas Schoute --- source/_integrations/homekit.markdown | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/source/_integrations/homekit.markdown b/source/_integrations/homekit.markdown index 6ec9ecb70c8..902a1555620 100644 --- a/source/_integrations/homekit.markdown +++ b/source/_integrations/homekit.markdown @@ -479,6 +479,31 @@ The following integrations are currently supported: | switch | Switch | Represented as a switch by default but can be changed by using `type` within `entity_config`. | | water_heater | WaterHeater | All `water_heater` devices. | +## iOS Remote Widget + +Entities exposed as `TelevisionMediaPlayer` are controllable within the Apple Remote widget in +Control Center. Play, pause, volume up and volume down should work out of the box depending on the `supported_features` +of the entity. However, if your television can be controlled in other ways outside of the `media_player` entity, (i.e. +service calls to an IR blaster), it is possible to build an automation to take advantage of these events. + +When a key is pressed within the Control Center Remote widget, the event `homekit_tv_remote_key_pressed` will be fired. +The key name will be available in the event data in the `key_name` field: + +```yaml +automation: + trigger: + platform: event + event_type: homekit_tv_remote_key_pressed + event_data: + key_name: arrow_right + + # Send the arrow right key via a broadlink IR blaster + action: + service: broadlink.send + host: 192.168.1.55 + packet: XXXXXXXX +``` + ## Troubleshooting ### Resetting when created via YAML