Hi.
I have a problem with running a command as a command line sensor. I have these lines in my config.yaml:
- platform: command_line
name: Flydata
command: "python3 /usr/share/hassio/homeassistant/python_scripts/flysjekk.py {{ states('sensor.openskyflights') }}"
The sensor triggers everytime the sensors.openskyflghts changes. Passing the flightnbr to the python scrpt.
When I run this command in the terminal it works great, but when the sensor tries to run it fails with the following error:
Logger: homeassistant.components.command_line
Source: components/command_line/init.py:41
Integration: command_line (documentation, issues)
First occurred: 10:05:42 (60 occurrences)
Last logged: 11:04:42
- Command failed: python3 /usr/share/hassio/homeassistant/python_scripts/flysjekk.py NAX523
- Command failed: python3 /usr/share/hassio/homeassistant/python_scripts/flysjekk.py KLM29U
- Command failed: python3 /usr/share/hassio/homeassistant/python_scripts/flysjekk.py LNOFY
Running the comman from terminal returns what you see in the enclosed picture
I appreciate if the help I can get.
I’m running hassio on docker on Ubuntu.