Philips Hue Play HDMI Sync Box custom integration

Wanted to share something simple I did that could be useful for people like me who use the same sync box preset for almost everything. Here is a template switch I created that monitors the state of the hue box, and turns on the box with defaults, and turns off the box when toggled off. I have this paired with my TV turn on and off automations, and expose it to my frontend as an easy manual toggle.

- platform: template
  switches:
    is_hue_syncing:
      unique_id: hue_sync_template_switch
      icon_template: phu:sync-box-alt
      value_template: "{{ is_state('switch.sync_box_power', 'on') }}"
      turn_on:
        service: huesyncbox.set_sync_state
        metadata: {}
        data:
          power: true
          sync: true
          intensity: moderate
          mode: video
          input: input2
          brightness: 30
          entertainment_area: TV area
        target:
          device_id: [[DEVICE_ID]]
      turn_off:
        service: huesyncbox.set_sync_state
        metadata: {}
        data:
          power: false
        target:
          device_id: [[ DEVICE_ID]]

A potential limitation that I have not tested include what happens if the box is turned on from the official hue app with different states. But for me this switch has made it easier to integrate the box into automatons and into the frontend.

1 Like