diff --git a/.gitignore b/.gitignore index ec7c31d..4b6e108 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ src/config.hpp #ignore wifi image img/wifi.png + +#ignore json in tests +tests/*.json diff --git a/tests/getHA.sh b/tests/getHA.sh new file mode 100755 index 0000000..870bda1 --- /dev/null +++ b/tests/getHA.sh @@ -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