Skip to content

Commit

Permalink
Merge pull request #45 from shoejosh/add-ha-api-auth
Browse files Browse the repository at this point in the history
Add auth header for homeassistant API requests
  • Loading branch information
danimtb authored Aug 2, 2018
2 parents 5411ea1 + 22b6c3b commit 1855fdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dasshio/dasshio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 1855fdb

Please sign in to comment.