Send headers with REST switch GET request (#17036)
This commit is contained in:
parent
e5c0e4336d
commit
f0fbdd6a26
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue