Send headers with REST switch GET request (#17036)

This commit is contained in:
Josh Anderson 2018-10-01 13:43:54 +01:00 committed by Paulus Schoutsen
parent e5c0e4336d
commit f0fbdd6a26

View file

@ -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: