Can I create a binary sensor that scans a port rather than pinging?

Does anyone know why I am getting a short interval of state unknown between on and off using this:

command_line:
  - binary_sensor:
      name: Virgin TV 360
      command: 'nc -z 192.168.0.x 8081 > /dev/null 2>&1 && echo ON || echo OFF'
      icon: mdi:set-top-box
      scan_interval: 30

image

It happens every time.