Safe and reliable bash-only implementation:
- Works in SSH add-on without Python
- Uses awk for YAML parsing (reliable and fast)
- Automatic timestamped backups
- Extracts legacy template definitions
- Converts to modern template: syntax
- Removes legacy platform: template blocks
- Adds modern templates to configuration.yaml
- Generates restore script for rollback
- Exit on error for safety (set -e)
- Temp directory cleanup with trap
Fixes all 67 template deprecation warnings without Python dependencies.
Automatically migrates legacy template syntax to modern template: syntax:
- Scans all YAML files for platform: template definitions
- Converts sensors and binary_sensors to modern format
- Creates timestamped backups
- Removes legacy definitions
- Adds modern template: section to configuration.yaml
- Preserves all template features (icons, attributes, device_class, etc)
- Generates restore script for rollback
Fixes all 67 template deprecation warnings automatically.