PS4 Integration + Homekit

Hello! :smiley:

Hope you are all doing well in this pandemic hard times!

I’m trying to integrate correctly my PS4 with HomeKit. To do so I retrieved some scripts and automation from a YouTube video (https://www.youtube.com/watch?v=Yl_xymBz_6c&t=1s). It works, but at the same time, it does not :frowning:

Sometimes siri is able to turn on / turn off, sometimes it doesn’t :frowning: Since PS4 is considerate a media control center why doesn’t it appear normally, without any automations or scripts? Is it possible to do so? (cause these automations and scripts also fill up my “home” app xDD) If it’s not possible, how can I make this more accurate? Like make it check if it’s on or off and be able to turn off or on in one shot?

Automations:

- alias: 'BOOL Turn on PS4'
  initial_state: on
  trigger:
    - platform: state
      entity_id: input_boolean.playstation
      to: 'on'
  action:
    - service: script.turn_on
      entity_id: script.turn_on_playstation
     
- alias: 'BOOL Turn off PS4'
  initial_state: on
  trigger:
    - platform: state
      entity_id: input_boolean.playstation
      to: 'off'
  action:
    - service: script.turn_on
      entity_id: script.turn_off_playstation

Scripts:

turn_on_playstation:
  alias: Turn on PS4
  sequence:
  - data:
      entity_id: media_player.playstation_4_pro
    service: media_player.turn_on
turn_off_playstation:
  alias: Turn off PS4
  sequence:
  - data:
      entity_id: media_player.playstation_4_pro
    service: media_player.turn_off

Configurations.yaml:

input_boolean:
  playstation:
    icon: mdi:playstation
    name: Playstation

Thank you so much for your time!!