🇧🇬 Bulgarian

Shell Command Generator for Home Assistant

This tool helps you generate YAML files for the shell_command integration in Home Assistant

Important Usage Information

Configuration Format

This generator creates files for use with !include_dir_named:

# configuration.yaml
shell_command: !include_dir_named yaml/shell_command

Each file must contain only the command, without the shell_command: prefix!

Shell Command Instructions

  • Shell commands run in the Home Assistant environment
  • Use full paths to executable files
  • For complex commands, create a script and call it
  • Command name must not contain spaces
  • Files are saved in the yaml/shell_command/ directory

Command Settings

Name must not contain spaces!
Command is required!

Configuration Preview

File will be downloaded with .yaml extension
Configuration will appear here after clicking "Generate Configuration"

Ready Examples

Click on any example to load it into the generator:

Example 1: Service Restart
Restart Docker container
docker restart addon_db21ed7f_qbittorrent
Example 2: File Copy
Copy configuration file between containers
docker cp /config/openvpn/config.ovpn addon_db21ed7f_qbittorrent:/config/openvpn/config.ovpn
Example 3: Script Execution
Execute Python script
python3 /config/scripts/backup.py
Example 4: Network Check
Ping test to device
ping -c 3 192.168.1.1
Example 5: Database Backup
Create database backup
pg_dump -U homeassistant -h localhost homeassistant > /backup/ha_backup_$(date +%Y%m%d_%H%M%S).sql
Example 6: Disk Space Check
Show used disk space
df -h /config