Command Line Sensor not doing anything

I’m trying to create a sensor to let me know if a service is running on a remote linux machine.
I have the command sorted, I’ve tested it in Terminal and it returns the expected “running”
However when I put the command into a yaml file it doesn’t seem to do anything, I’m not even getting a blank sensor.

in configuration. yaml I have:

command_line: !include_dir_merge_list command_line/

Then in the command_line folder I have a Mythtv_backend.yaml file which contains

command_line:
  - sensor:
    name: "MythTV Backend Status"
    command: "ssh -i /config/.ssh/id_rsa -o UserKnownHostsFile=/config/.ssh/known_hosts [email protected] systemctl show mythtvbackend | awk -F= '/^SubState=/ {print $2}'"
    scan_interval: 60

I’ve increased the loggin level to debug and I even tried appending >2 /config/command.log to the command. In both instances there were no errors.

So no sensor in Developer tools/States and nothing in the logs.

You need to remove the command_line: from your Mythtv_backend.yaml file. It’s already there in the !include line.

Thanks for catching that, gets me every time.
Potentially dumb question, I’m still not getting a sensor being created. I tried a binary_sensor since the results will be one of 2 values, but that’s not being created either.
Do I need to create the sensor or binaray_sensor in sensor/ or binary_sensor/ ?

Not sure what happened overnight but I am now seeing the MythTV_Backend_Status sensor and the MythTV_Backend binary sensor.
Unfortunately both sensors are returning incorrect information.
MythTV_Backend (binary sensor) has a state of off, and
MythTV_Backend_Status (sensor) has a state of ‘dead’ which is the response of ‘systemctl show mythtvbackend’ when the service is not running.

However when I run the command in the first post from terminal inside HA I get ‘running’ which is the correct answer.