Files
dot.config/bin/hass
T
daniel fusser 49462fb909 initial commit
2026-06-23 00:38:32 +02:00

15 lines
421 B
Bash
Executable File

#!/bin/sh
#
set -a; . "${HOME}/.config/secrets/hass"; set +a
# curl -s -X GET \
# -H "Authorization: Bearer ${token}" \
# -H "Content-Type: application/json" \
# https://hass.dafu.dev/api/states
#
curl -s -X POST \
-H "Authorization: Bearer ${token}" \
-H "Content-Type: application/json" \
-d '{"entity_id":"switch.'${1}'"}' \
https://hass.dafu.dev/api/services/switch/toggle || notify-send "${1} failed"