New backup 2025-04-22 10:33:30
This commit is contained in:
parent
c780fd2839
commit
68e046fc56
3 changed files with 48 additions and 2 deletions
|
@ -168,8 +168,8 @@ SetEditor=false
|
|||
[MainWindow]
|
||||
1920x1200 screen: Height=532
|
||||
1920x1200 screen: Width=613
|
||||
2 screens: Height=863
|
||||
2 screens: Width=527
|
||||
2 screens: Height=856
|
||||
2 screens: Width=727
|
||||
2048x1280 screen: Height=589
|
||||
2048x1280 screen: Width=999
|
||||
3 screens: Height=549
|
||||
|
|
45
default/home/Scripts/ha
Executable file
45
default/home/Scripts/ha
Executable file
|
@ -0,0 +1,45 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
#https://developers.home-assistant.io/docs/api/rest/
|
||||
|
||||
source "${HOME}/.secrets"
|
||||
|
||||
while getopts "a:e:d:s:" flag; do
|
||||
case $flag in
|
||||
a)
|
||||
action="${OPTARG}"
|
||||
;;
|
||||
e)
|
||||
entity_id="${OPTARG}"
|
||||
;;
|
||||
d)
|
||||
domain="${OPTARG}"
|
||||
;;
|
||||
s)
|
||||
service="${OPTARG}"
|
||||
;;
|
||||
*)
|
||||
printf '%s' "bad option: ${flag}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
#echo "action: ${action}"
|
||||
#echo "entity_id: ${entity_id}"
|
||||
|
||||
case "${action}" in
|
||||
"states")
|
||||
curl -s \
|
||||
-H "Authorization: Bearer ${HA_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
"${HA_URL}/api/${action}/${entity_id}" | jq '.'
|
||||
;;
|
||||
"services")
|
||||
# echo '{"entity_id": "'"${entity_id}"'"}'
|
||||
curl -s \
|
||||
-H "Authorization: Bearer ${HA_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"entity_id": "'"${entity_id}"'"}' \
|
||||
"${HA_URL}/api/${action}/${domain}/${service}" | jq '.'
|
||||
;;
|
||||
esac
|
|
@ -7,3 +7,4 @@ Scripts/create-podman-container.sh
|
|||
Scripts/create-podman-container-arm.sh
|
||||
.local/lib/python3.13/site-packages/ssi.py
|
||||
.local/bin/ssi-server
|
||||
Scripts/ha
|
||||
|
|
Loading…
Add table
Reference in a new issue