I'm running HA on a RPi, installed using the standard Home Assistant OS image method. I want to be able to have HA run commands on a PoE ethernet switch I have for work. I planned on using an expect script to ssh into the device and run the commands. That doesn't work since expect isn't installed. I found some notes about possibly using pexpect in a python script, but it doesn't look like pexpect is installed either. Is there a way to get expect or pexpect installed? Or maybe someone knows a better method of doing this? The script just turns PoE on or off to specific ports based on the MAC_ADDRESS provided. I have a working expect script. Hoping for something like this:
command_line:
- switch:
name: Device Power Command Line
command_on: 'python /config/python/poe.py <MAC_ADDRESS> on'
command_off: 'python /config/python/poe.py <MAC_ADDRESS> off'