Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Get the output of ha su info
info_output=$(ha core info)
# Parse the output and extract values
update_available=$(echo "$info_output" | grep -Eo 'update_available: (true|false)')
version_latest=$(echo "$info_output" | grep -Eo 'version_latest: .*' | cut -d ' ' -f2)
# Check if update is available