Remote Sensor Command Line PI

Remote Sensor Command Line PI
Hi, sorry if this is a silly question but I am having problems with the basics of command line.
Ultimately I have a raspberry pi controlling some old switches with a complex 433Hz protocol not supported anywhere.
So I want to run a python 3 programme on this remote Pi
But just to start I tried the Sensor Command line with a hello.py script.
With it placed on the hass.io pi this works

  • platform: command_line
    name: Byron
    command: "python3 /config/hello.py”

giving a “Hello” response in a sensor.
when I use

command: "ssh [email protected] python3 hello.py”

It does not work
It obviously works when run on the remote pi directly and is in the home/pi directory
Any ideas.
This is the error
Command failed: ssh [email protected] python3 hello.py
22:14 components/sensor/command_line.py (ERROR)

Try changing the quotes around, something like:

command: 'ssh [email protected] "python3 hello.py”'

or just:

command: ssh [email protected] "python3 hello.py"

Thank you so much for answering.
I just tried both and the same errors
Command failed: ssh [email protected] “python3 hello.py”
22:57 components/sensor/command_line.py (ERROR)
Command failed: ssh [email protected] “python3 hello.py”
22:57 components/sensor/command_line.py (ERROR)