Tidy up logging

This commit is contained in:
2024-05-16 23:51:01 +01:00
parent d8e6d5a3fd
commit 7547f612f5
3 changed files with 2 additions and 6 deletions

4
api.py
View File

@@ -9,7 +9,7 @@ def getReq(endpoint) -> dict:
"Authorization": "Bearer " + TOKEN,
"content-type": "application/json"
}
print("Starting request for " + endpoint)
print("GET " + endpoint)
try:
response = get(HASS_URL + endpoint, headers=headers)
return response.json()
@@ -22,7 +22,7 @@ def postReq(endpoint, d) -> bool:
"Authorization": "Bearer " + TOKEN,
"content-type": "application/json"
}
print("Starting post request to " + endpoint)
print("POST " + endpoint)
try:
response = post(HASS_URL + endpoint, headers=headers, json=d)
return response.status_code == 200