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: