Python script import issues in hass.io

I tried to use the official script function but couldn’t migrate to it.

But for command_line switches regular python scripts seem to work. There’s at least two of us :slight_smile:

So I can call this in hass.io no problem:

- platform: command_line
  switches:
    mote_custom_switch_rgb:
      command_on: "python3 /config/mote-hass-api-call-for-hassio.py"
      command_off: "python3 /config/mote-hass-api-call-for-hassio.py"
      friendly_name: Illuminate

So I guess the advice is turn the script into python3, put it in the /config folder, and it’ll probably work!

2 Likes