This blueprint allows you specify actions that get performed for events fired for a Homekit TV using the iOS remote. In other words, if you have home assistant setup with a TV homekit accessory, you can use this to turn your phone into a remote control and easily specify the actions that get performed.
Requirements:
You need to have a media_player that is a tv device_class and is setup as a homekit accessory.
You need an iOS device with homekit setup and paired with your home assistant homekit bridge/accessory.
You need to enable “Apple TV Remote” in the iOS control center.
You access the remote by swiping down from the top of the screen to see the control center and then pressing the remote button.
Why would you want to do this?
For some reason you want to use your iPhone as a TV remote.
The on-off button and mute don’t send homekit remote events in home assistant so can’t be supported by the blueprint. In theory they should be supported by the homekit integration exposing those elements from the media_player tv entity, much like how volume works in the remote. But the on/off and mute buttons don’t appear to be working for me either.
You are awesome! I just figured out how to make a media_player for my IR cable box and this works perfectly to make up for the lacking support. It always feels great when you don’t expect something to work & it works well.
I can’t make sense of why we aren’t able to re-map these keys in the universal media_player config, or maybe I just don’t know how.
Also, it is frustrating they don’t enable the set-top-box (stb) sub-type of the TV device. It is no different from the receiver, it just provides a nicer icon for STBs. Homebridge supports the STB type but not HA…
Oh well, I really appreciate this blueprint! One more thing out of Homebridge & into HA!
Hey, great blueprint, made it very easy for me to map my remote. Thank you
Just one question - and not sure if it’s something that can be rectified with this blueprint of if it’s a HomeKit thing.
My TV has an ambient mode - so it still has some features that can be accessed when the TV is turned off.
However, using this, anytime I press a button it seems to turn the media player entity on. E.g - I press the left or right arrow buttons to change something on the screensaver, and it boots up the TV.
Not the biggest deal but if you know what the cause is, that’d be very helpful
I believe that if your homekit TV device is powered off, when you press a button on the iOS remote screen that your Apple device will send a power-on request to the HomeKit TV device.
In other words I think it is your iOS device that is causing the power-on that you don’t want.
If you don’t care about being able to power on your tv from the iOS remote or from HomeKit, maybe you could work around it by wrapping your TV media player entity with a Universal media player entity that did nothing for turn-on (and then use that universal media player entity for HomeKit and the remote). But then you wouldn’t be able to turn on the TV at all with the remote/homekit, so probably not what you would want.
I’m new to Home Assistant and are slowly migrating TV accessories from Homebridge to HA, so please forgive if I ask something obvious. I have used the blueprint with success for my Sony and Samsung TVs, and now I’m working on a more complex case - Logitech Harmony Hub (exposed as a remote instead of media_player).
For it to work I need the automation to do different things based on the current activity. From example, when I’m watching movie, I’d like the remote to control my media player, and when I listen to music I’d like the remote to control the music streamer etc. The generated YAML file looks like below, I need some magic to branch for “command” and “device” with different activity state:
Do you have a sensor already that determines whether you are watching a movie or not? If so, you could add an additional if/then building block to perform a different action based on that sensor. Something like what I pasted below (but replaced with your entities and your states and your commands)
It’s also possible you could use a template (instead of the “if/then/else” building block) to replace the command and device, which could make the solution more compact.
Also see the if-then section of this page for more details: