From 22b6c3bbc49a671bfd6481f6dec4ee003b361f58 Mon Sep 17 00:00:00 2001 From: Josh Shoemaker Date: Tue, 31 Jul 2018 21:44:04 -0400 Subject: [PATCH] Add auth header for homeassistant API requests --- dasshio/dasshio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dasshio/dasshio.py b/dasshio/dasshio.py index 335dcb9..e3d173a 100644 --- a/dasshio/dasshio.py +++ b/dasshio/dasshio.py @@ -57,7 +57,7 @@ def arp_display(pkt): button["body"]), headers=json.loads(button["headers"])) else: request = requests.post(url_request, json=json.loads( - button["service_data"])) + button["service_data"]), headers={'x-ha-access': os.environ.get('HASSIO_TOKEN')}) logging.info("Status Code: {}".format(request.status_code))