Blackbird 4K HDBaseT 4x4 Matrix with PoC, 4K@60Hz

Hi.
anyone had any luck setting up this device?
it has ip control.
link to user manual : https://downloads.monoprice.com/files/manuals/15779_Manual_161206.pdf

I have the exact same model. Im trying to use the Blackbird integration (https://www.home-assistant.io/integrations/blackbird/) which is the 8x8 model. Im getting the follow error

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/blackbird/media_player.py", line 88, in setup_platform
    blackbird = get_blackbird(host, False)
  File "/usr/local/lib/python3.7/site-packages/pyblackbird/__init__.py", line 263, in get_blackbird
    return BlackbirdSync(url)
  File "/usr/local/lib/python3.7/site-packages/pyblackbird/__init__.py", line 176, in __init__
    self.socket.connect((self.host, self.port))
ConnectionRefusedError: [Errno 111] Connection refused

did you ever figure it out?

I have this model. I did find this fork of pyblackbird that added support for 4x4 Matrix PID 15779 but I could never figure it out. Hopefully it gets officially added someday.

So instead I decided to just use sensors, templates, rest commands, shell commands and scripts to achieve control.

First I created a sensor in configuration.yaml

The below gets the status of the matrix and stores it as a sensor that we can reference. That way we can just poll the device once every x seconds and get all the information we need.

sensor:
  - platform: rest
    resource: "http://192.168.20.90/TimSendCmd.CGI"
    name: "Matrix Status"
    method: GET
    value_template: "{{ value }}"
    scan_interval: 10  # Adjust the interval as needed

Then we create some template sensors to tell us what is patched where.

  - platform: template
    sensors:
      matrix_output_1_to_input_1:
        friendly_name: "Matrix Output 1 to Input 1"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O1I1' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_1_to_input_2:
        friendly_name: "Matrix Output 1 to Input 2"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O1I2' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}

Now to create the switches.

switch:
  - platform: template
    switches:
      output_1_to_input_1:
        friendly_name: "Output 1 to Input 1"
        value_template: "{{ is_state('sensor.matrix_output_1_to_input_1', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_1_to_input_1_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status  # No off command needed, just update the status

      output_1_to_input_2:
        friendly_name: "Output 1 to Input 2"
        value_template: "{{ is_state('sensor.matrix_output_1_to_input_2', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_1_to_input_2_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

These are the commands needed to actually control the matrix.

rest_command:
  switch_output_1_to_input_1_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O1I1"
  switch_output_1_to_input_2_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O1I2"

I then wanted to be able to assign all outputs to a certain input but there wasn’t a way to do that via the Matrix web UI so I ended up learning how to do it with telnet commands. I could have then gone back and replaced all the rest_commands with shell_commands but I haven’t done that yet as there doesn’t seem to be any difference in performance.

shell_command:
  matrix_all_out_1: "{ echo -ne '>@WVSOA[1]\\r'; sleep 1; } | nc 192.168.20.90 23"
  matrix_all_out_2: "{ echo -ne '>@WVSOA[2]\\r'; sleep 1; } | nc 192.168.20.90 23"

I only shared the first two inputs/outputs as it ended up being many lines of code. But the results were worth it.

Super easy control of the matrix with the status of all the inputs and outputs.

It could definitely be improved though with better naming convention, storing the IP address as a template, adding in the icon etc. Just use a text editor with find and replace to swap out the IP address.

Entire configuration.yaml code
switch:
  - platform: template
    switches:
      output_1_to_input_1:
        friendly_name: "Output 1 to Input 1"
        value_template: "{{ is_state('sensor.matrix_output_1_to_input_1', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_1_to_input_1_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status  # No off command needed, just update the status

      output_1_to_input_2:
        friendly_name: "Output 1 to Input 2"
        value_template: "{{ is_state('sensor.matrix_output_1_to_input_2', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_1_to_input_2_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

      output_1_to_input_3:
        friendly_name: "Output 1 to Input 3"
        value_template: "{{ is_state('sensor.matrix_output_1_to_input_3', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_1_to_input_3_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

      output_1_to_input_4:
        friendly_name: "Output 1 to Input 4"
        value_template: "{{ is_state('sensor.matrix_output_1_to_input_4', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_1_to_input_4_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

      output_2_to_input_1:
        friendly_name: "Output 2 to Input 1"
        value_template: "{{ is_state('sensor.matrix_output_2_to_input_1', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_2_to_input_1_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

      output_2_to_input_2:
        friendly_name: "Output 2 to Input 2"
        value_template: "{{ is_state('sensor.matrix_output_2_to_input_2', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_2_to_input_2_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

      output_2_to_input_3:
        friendly_name: "Output 2 to Input 3"
        value_template: "{{ is_state('sensor.matrix_output_2_to_input_3', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_2_to_input_3_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

      output_2_to_input_4:
        friendly_name: "Output 2 to Input 4"
        value_template: "{{ is_state('sensor.matrix_output_2_to_input_4', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_2_to_input_4_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

      output_3_to_input_1:
        friendly_name: "Output 3 to Input 1"
        value_template: "{{ is_state('sensor.matrix_output_3_to_input_1', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_3_to_input_1_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

      output_3_to_input_2:
        friendly_name: "Output 3 to Input 2"
        value_template: "{{ is_state('sensor.matrix_output_3_to_input_2', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_3_to_input_2_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

      output_3_to_input_3:
        friendly_name: "Output 3 to Input 3"
        value_template: "{{ is_state('sensor.matrix_output_3_to_input_3', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_3_to_input_3_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

      output_3_to_input_4:
        friendly_name: "Output 3 to Input 4"
        value_template: "{{ is_state('sensor.matrix_output_3_to_input_4', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_3_to_input_4_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

      output_4_to_input_1:
        friendly_name: "Output 4 to Input 1"
        value_template: "{{ is_state('sensor.matrix_output_4_to_input_1', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_4_to_input_1_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

      output_4_to_input_2:
        friendly_name: "Output 4 to Input 2"
        value_template: "{{ is_state('sensor.matrix_output_4_to_input_2', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_4_to_input_2_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

      output_4_to_input_3:
        friendly_name: "Output 4 to Input 3"
        value_template: "{{ is_state('sensor.matrix_output_4_to_input_3', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_4_to_input_3_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

      output_4_to_input_4:
        friendly_name: "Output 4 to Input 4"
        value_template: "{{ is_state('sensor.matrix_output_4_to_input_4', 'True') }}"
        turn_on:
          - service: rest_command.switch_output_4_to_input_4_on
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status
        turn_off:
          - service: homeassistant.update_entity
            entity_id: sensor.matrix_status

sensor:
  - platform: rest
    resource: "http://192.168.20.90/TimSendCmd.CGI"
    name: "Matrix Status"
    method: GET
    value_template: "{{ value }}"
    scan_interval: 10  # Adjust the interval as needed

  - platform: template
    sensors:
      matrix_output_1_to_input_1:
        friendly_name: "Matrix Output 1 to Input 1"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O1I1' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_1_to_input_2:
        friendly_name: "Matrix Output 1 to Input 2"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O1I2' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_1_to_input_3:
        friendly_name: "Matrix Output 1 to Input 3"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O1I3' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_1_to_input_4:
        friendly_name: "Matrix Output 1 to Input 4"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O1I4' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_2_to_input_1:
        friendly_name: "Matrix Output 2 to Input 1"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O2I1' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_2_to_input_2:
        friendly_name: "Matrix Output 2 to Input 2"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O2I2' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_2_to_input_3:
        friendly_name: "Matrix Output 2 to Input 3"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O2I3' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_2_to_input_4:
        friendly_name: "Matrix Output 2 to Input 4"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O2I4' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_3_to_input_1:
        friendly_name: "Matrix Output 3 to Input 1"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O3I1' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_3_to_input_2:
        friendly_name: "Matrix Output 3 to Input 2"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O3I2' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_3_to_input_3:
        friendly_name: "Matrix Output 3 to Input 3"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O3I3' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_3_to_input_4:
        friendly_name: "Matrix Output 3 to Input 4"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O3I4' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_4_to_input_1:
        friendly_name: "Matrix Output 4 to Input 1"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O4I1' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_4_to_input_2:
        friendly_name: "Matrix Output 4 to Input 2"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O4I2' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_4_to_input_3:
        friendly_name: "Matrix Output 4 to Input 3"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O4I3' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}
      matrix_output_4_to_input_4:
        friendly_name: "Matrix Output 4 to Input 4"
        value_template: >-
          {% if states.sensor.matrix_status.state is defined and states.sensor.matrix_status.state != "unknown" %}
            {{ 'O4I4' in states.sensor.matrix_status.state }}
          {% else %}
            false
          {% endif %}

rest_command:
  switch_output_1_to_input_1_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O1I1"
  switch_output_1_to_input_2_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O1I2"
  switch_output_1_to_input_3_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O1I3"
  switch_output_1_to_input_4_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O1I4"
  switch_output_2_to_input_1_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O2I1"
  switch_output_2_to_input_2_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O2I2"
  switch_output_2_to_input_3_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O2I3"
  switch_output_2_to_input_4_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O2I4"
  switch_output_3_to_input_1_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O3I1"
  switch_output_3_to_input_2_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O3I2"
  switch_output_3_to_input_3_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O3I3"
  switch_output_3_to_input_4_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O3I4"
  switch_output_4_to_input_1_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O4I1"
  switch_output_4_to_input_2_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O4I2"
  switch_output_4_to_input_3_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O4I3"
  switch_output_4_to_input_4_on:
    url: "http://192.168.20.90/TimSendCmd.CGI?button=O4I4"

shell_command:
  matrix_all_out_1: "{ echo -ne '>@WVSOA[1]\\r'; sleep 1; } | nc 192.168.20.90 23"
  matrix_all_out_2: "{ echo -ne '>@WVSOA[2]\\r'; sleep 1; } | nc 192.168.20.90 23"
  matrix_all_out_3: "{ echo -ne '>@WVSOA[3]\\r'; sleep 1; } | nc 192.168.20.90 23"
  matrix_all_out_4: "{ echo -ne '>@WVSOA[4]\\r'; sleep 1; } | nc 192.168.20.90 23"

To change the all Outputs I created a script for each of the 4 actions. Once you click Set all outputs to IN x it refreshes the status of the buttons to give faster status updates.

alias: HDMI Matrix Outputs 1
sequence:
  - action: shell_command.matrix_all_out_1
    metadata: {}
    data: {}
  - action: homeassistant.update_entity
    metadata: {}
    data:
      entity_id:
        - sensor.matrix_status
description: Set all inputs to output 1
mode: parallel
max: 10
Lovelace YAML
type: grid
cards:
  - type: heading
    heading: HDMI Matrix
    heading_style: title
  - type: heading
    icon: mdi:video-input-hdmi
    heading: OUT 1 - East Projector
    heading_style: title
  - square: false
    type: grid
    cards:
      - type: tile
        entity: switch.output_1_to_input_1
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_1_to_input_1
        icon: mdi:hdmi-port
        vertical: true
        hide_state: true
        name: IN 1 - East
      - type: tile
        entity: switch.output_1_to_input_2
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_1_to_input_2
        icon: mdi:hdmi-port
        hide_state: true
        vertical: true
        name: IN 2 - GCC
      - type: tile
        entity: switch.output_1_to_input_3
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_1_to_input_3
        icon: mdi:hdmi-port
        hide_state: true
        vertical: true
        name: IN 3 - Mid
      - type: tile
        entity: switch.output_1_to_input_4
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_1_to_input_4
        icon: mdi:hdmi-port
        hide_state: true
        vertical: true
        name: IN 4 - West
    columns: 4
    grid_options:
      columns: 48
      rows: auto
  - type: tile
    entity: script.hdmi_matrix_outputs_1
    hide_state: true
    vertical: true
    show_entity_picture: false
    name: Set all Outputs to IN 1
    icon_tap_action:
      action: toggle
    icon: mdi:arrow-decision-outline
    tap_action:
      action: toggle
    grid_options:
      columns: 6
      rows: 2
  - type: heading
    icon: mdi:video-input-hdmi
    heading: OUT 2 - East L.
    heading_style: title
  - square: false
    type: grid
    cards:
      - type: tile
        entity: switch.output_2_to_input_1
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_2_to_input_1
        icon: mdi:hdmi-port
        vertical: true
        hide_state: true
        name: IN 1 - East
      - type: tile
        entity: switch.output_2_to_input_2
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_2_to_input_2
        icon: mdi:hdmi-port
        hide_state: true
        vertical: true
        name: IN 2 - GCC
      - type: tile
        entity: switch.output_2_to_input_3
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_2_to_input_3
        icon: mdi:hdmi-port
        hide_state: true
        vertical: true
        name: IN 3 - Mid
      - type: tile
        entity: switch.output_2_to_input_4
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_2_to_input_4
        icon: mdi:hdmi-port
        hide_state: true
        vertical: true
        name: IN 4 - West
    columns: 4
    grid_options:
      columns: 48
      rows: auto
  - type: tile
    entity: script.hdmi_matrix_outputs_2
    hide_state: true
    vertical: true
    show_entity_picture: false
    name: Set all Outputs to IN 2
    icon_tap_action:
      action: toggle
    icon: mdi:arrow-decision-outline
    tap_action:
      action: toggle
    grid_options:
      columns: 6
      rows: 2
  - type: heading
    icon: mdi:video-input-hdmi
    heading: OUT 3 - Middle Projector
    heading_style: title
  - square: false
    type: grid
    cards:
      - type: tile
        entity: switch.output_3_to_input_1
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_3_to_input_1
        icon: mdi:hdmi-port
        vertical: true
        hide_state: true
        name: IN 1 - East
      - type: tile
        entity: switch.output_3_to_input_2
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_3_to_input_2
        icon: mdi:hdmi-port
        hide_state: true
        vertical: true
        name: IN 2 - GCC
      - type: tile
        entity: switch.output_3_to_input_3
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_3_to_input_3
        icon: mdi:hdmi-port
        hide_state: true
        vertical: true
        name: IN 3 - Mid
      - type: tile
        entity: switch.output_3_to_input_4
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_3_to_input_4
        icon: mdi:hdmi-port
        hide_state: true
        vertical: true
        name: IN 4 - West
    columns: 4
    grid_options:
      columns: 48
      rows: auto
  - type: tile
    entity: script.hdmi_matrix_outputs_3
    hide_state: true
    vertical: true
    show_entity_picture: false
    name: Set all Outputs to IN 3
    icon_tap_action:
      action: toggle
    icon: mdi:arrow-decision-outline
    tap_action:
      action: toggle
    grid_options:
      columns: 6
      rows: 2
  - type: heading
    icon: mdi:video-input-hdmi
    heading: OUT 4 - West Projector
    heading_style: title
  - square: false
    type: grid
    cards:
      - type: tile
        entity: switch.output_4_to_input_1
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_4_to_input_1
        icon: mdi:hdmi-port
        vertical: true
        hide_state: true
        name: IN 1 - East
      - type: tile
        entity: switch.output_4_to_input_2
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_4_to_input_2
        icon: mdi:hdmi-port
        hide_state: true
        vertical: true
        name: IN 2 - GCC
      - type: tile
        entity: switch.output_4_to_input_3
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_4_to_input_3
        icon: mdi:hdmi-port
        hide_state: true
        vertical: true
        name: IN 3 - Mid
      - type: tile
        entity: switch.output_4_to_input_4
        tap_action:
          action: perform-action
          perform_action: switch.turn_on
          target:
            entity_id: switch.output_4_to_input_4
        icon: mdi:hdmi-port
        hide_state: true
        vertical: true
        name: IN 4 - West
    columns: 4
    grid_options:
      columns: 48
      rows: auto
  - type: tile
    entity: script.hdmi_matrix_outputs_4
    hide_state: true
    vertical: true
    show_entity_picture: false
    name: Set all Outputs to IN 4
    icon_tap_action:
      action: toggle
    icon: mdi:arrow-decision-outline
    tap_action:
      action: toggle
    grid_options:
      columns: 6
      rows: 2
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: url
      url_path: http://192.168.20.90/
    name: Matrix Webpage
    icon: mdi:web
    show_state: false
    icon_height: 40px
column_span: 4