🚏 Special Logic
The @digital-alchemy/hass
library provides some additional functionality that is more specialized.
🛡 Backup API
You can request your Home Assistant instance start a new backup using the commands at hass.utils.backup
. Functions will block attempts to create a new backup while one is in progress, and will keep track of when yours completes.
🔧 Automatic configuration for supervised
If HASSIO_TOKEN
or SUPERVISOR_TOKEN
is detected as an environment variable (provided by Home Assistant for addons), then the library will update Configuration appropriately. Automatic values for BASE_URL
& TOKEN
. Occurs onPreInit
✔️ Validate Configuration
Want to quickly check if you defined your credentials in a valid way? Use
VALIDATE_CONFIGURATION
npx src/main.ts --VALIDATE_CONFIGURATION
TLDR: What to expect Some of the output variations you might encounter as a result of the script. Demonstrated using type-writer.
✅ Valid
❌ Bad Token
❌ Bad Address
Provided
http://127.0.0.1:8000
as URL, nothing is using that port.
🔐 SSL Error
Provided address to invalid subdomain.