From f0fbdd6a26f5eb70f2645a104f2521a4213e627c Mon Sep 17 00:00:00 2001 From: Josh Anderson Date: Mon, 1 Oct 2018 13:43:54 +0100 Subject: [PATCH] Send headers with REST switch GET request (#17036) --- homeassistant/components/switch/rest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/switch/rest.py b/homeassistant/components/switch/rest.py index 78eceeb421d..9b8f889a8ae 100644 --- a/homeassistant/components/switch/rest.py +++ b/homeassistant/components/switch/rest.py @@ -170,7 +170,8 @@ class RestSwitch(SwitchDevice): websession = async_get_clientsession(hass) with async_timeout.timeout(self._timeout, loop=hass.loop): - req = await websession.get(self._resource, auth=self._auth) + req = await websession.get(self._resource, auth=self._auth, + headers=self._headers) text = await req.text() if self._is_on_template is not None: