Help with multiple shell_command entries

Would someone help me understand what I’m getting wrong here? I’ve been staring at it too long, I think…

This works:

  kick_station_from_ap: 'ssh -i /config/ssh/id_rsa -o StrictHostKeyChecking=no [email protected] /root/bin/'

But adding a second command, generates a configuration error…

  kick_station_from_ap: 'ssh -i /config/ssh/id_rsa -o StrictHostKeyChecking=no [email protected] /root/bin/'
  restart_SAB_jail: 'ssh -i /config/ssh/id_rsa -o StrictHostKeyChecking=no [email protected] /usr/local/bin/iocage'     
Invalid config for [shell_command]: invalid slug restart_SAB_jail (try restart_sab_jail) for dictionary value @ data['shell_command']. Got OrderedDict([('kick_station_from_ap', 'ssh -i /config/ssh/id_rsa -o StrictHostKeyChecking=no [email protected] /root/bin/'), ('restart_SAB_jail', 'ssh -i /config/ssh/id_rsa -o StrictHostKeyChecking=no [email protected] /usr/local/bin/iocage')]). (See /config/configuration.yaml, line 61). 

Thank you!

try rewriting the second with low caps restart_sab_jail

Oh wow… yes, that was it. Thank you.

Is this a yaml thing that I’m not aware of?

It’s a Home Assistant thing. Object ids must be lowercase letters, numbers or underscore characters only. Friendly Names and Names can have capital letters, other characters and spaces as well.


I searched the forum high and low and this is precisely what was happening to me!!! I can’t believe it!!!

thanks a million for this Tom!

1 Like