Add home assistant test script

This commit is contained in:
Tyler Perkins 2022-01-28 17:31:26 -05:00
parent d857ae85cf
commit fed9d23ed8
2 changed files with 13 additions and 0 deletions

3
.gitignore vendored
View File

@ -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
View 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