According to the documentation, Command line Switch doesn´t have the availability_template option so it cannot be set to unavailable:
Could this option be added as in the Template Switch (https://www.home-assistant.io/integrations/switch.template/) so a return value can be defined for Available or Unavailable?