mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
Send headers with REST switch GET request (#17036)
This commit is contained in:
parent
e5c0e4336d
commit
f0fbdd6a26
@ -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…
x
Reference in New Issue
Block a user