Hi all,
Just getting started with all this home automation stuff, and i’d like to share some snippets from my personal configuration, since i already got a lot of help from reading the posts. I didn’t find anything ready to use, so i had to create one.
My main goal was to use the native iOS Remote integration, as i already had the Bravia TV and Homekit configurations (must be added as an accessory).
Basically you have to create an automation for the homekit events, and then send the remote commands to Bravia TV integration:
alias: Eventos iOS Remote da Sala
description: ""
trigger:
- platform: event
event_type: homekit_tv_remote_key_pressed
condition:
- condition: template
value_template: "{{ trigger.event.data.entity_id == 'media_player.tv_da_sala' }}"
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.event.data.key_name == 'arrow_up' }}"
alias: Arrow Up
sequence:
- service: remote.send_command
data:
command: Up
target:
entity_id: remote.tv_da_sala
- conditions:
- condition: template
value_template: "{{ trigger.event.data.key_name == 'arrow_down' }}"
alias: Arrow Down
sequence:
- service: remote.send_command
data:
command: Down
target:
entity_id: remote.tv_da_sala
- conditions:
- condition: template
value_template: "{{ trigger.event.data.key_name == 'arrow_left' }}"
alias: Arrow Left
sequence:
- service: remote.send_command
data:
command: Left
target:
entity_id: remote.tv_da_sala
- conditions:
- condition: template
value_template: "{{ trigger.event.data.key_name == 'arrow_right' }}"
alias: Arrow Right
sequence:
- service: remote.send_command
data:
command: Right
target:
entity_id: remote.tv_da_sala
- conditions:
- condition: template
value_template: "{{ trigger.event.data.key_name == 'select' }}"
alias: Select
sequence:
- service: remote.send_command
data:
command: Confirm
target:
entity_id: remote.tv_da_sala
- conditions:
- condition: template
value_template: "{{ trigger.event.data.key_name == 'back' }}"
alias: Return
sequence:
- service: remote.send_command
data:
command: Return
target:
entity_id: remote.tv_da_sala
- conditions:
- condition: template
value_template: "{{ trigger.event.data.key_name == 'information' }}"
alias: Home
sequence:
- service: remote.send_command
data:
command: Home
target:
entity_id: remote.tv_da_sala
alias: Define which button was pressed
mode: single
Hope this helps.