Add home assistant test script
This commit is contained in:
parent
d857ae85cf
commit
fed9d23ed8
3
.gitignore
vendored
3
.gitignore
vendored
@ -13,3 +13,6 @@ src/config.hpp
|
||||
|
||||
#ignore wifi image
|
||||
img/wifi.png
|
||||
|
||||
#ignore json in tests
|
||||
tests/*.json
|
||||
|
10
tests/getHA.sh
Executable file
10
tests/getHA.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
API_KEY=$(pass gluttony/homeassistant/API)
|
||||
IP_ADDR="192.168.1.104"
|
||||
|
||||
curl -X GET \
|
||||
-H "Authorization: Bearer $API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-o out.json \
|
||||
http://$IP_ADDR:8123/api/states
|
Loading…
Reference in New Issue
Block a user