### The problem
iAqualink switches not turning on/off. Reloading integration al…lows switches to work temporarily before reverting to initial problem.
### What version of Home Assistant Core has the issue?
2023.2.3
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
iAqualink
### Link to integration documentation on our website
_No response_
### Diagnostics information
_No response_
### Example YAML snippet
_No response_
### Anything in the logs that might be useful for us?
```txt
Logger: homeassistant.components.websocket_api.http.connection
Source: components/iaqualink/utils.py:14
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 10:48:11 AM (3 occurrences)
Last logged: 1:08:21 PM
[140437075810992] <ConnectionTerminated error_code:ErrorCodes.NO_ERROR, last_stream_id:965, additional_data:None>
[140435131696032] <ConnectionTerminated error_code:ErrorCodes.NO_ERROR, last_stream_id:965, additional_data:None>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/h2/connection.py", line 224, in process_input
func, target_state = self._transitions[(self.state, input_)]
KeyError: (<ConnectionState.CLOSED: 3>, <ConnectionInputs.SEND_HEADERS: 0>)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http2.py", line 106, in handle_async_request
await self._send_request_headers(request=request, stream_id=stream_id)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http2.py", line 203, in _send_request_headers
self._h2_state.send_headers(stream_id, headers, end_stream=end_stream)
File "/usr/local/lib/python3.10/site-packages/h2/connection.py", line 766, in send_headers
self.state_machine.process_input(ConnectionInputs.SEND_HEADERS)
File "/usr/local/lib/python3.10/site-packages/h2/connection.py", line 228, in process_input
raise ProtocolError(
h2.exceptions.ProtocolError: Invalid input ConnectionInputs.SEND_HEADERS in state ConnectionState.CLOSED
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
yield
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
raise exc
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
response = await connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 90, in handle_async_request
return await self._connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http2.py", line 139, in handle_async_request
raise RemoteProtocolError(self._connection_error_event)
httpcore.RemoteProtocolError: <ConnectionTerminated error_code:ErrorCodes.NO_ERROR, last_stream_id:965, additional_data:None>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1787, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1824, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 968, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 720, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 571, in async_handle_light_on_service
await light.async_turn_on(**filter_turn_on_params(light, params))
File "/usr/src/homeassistant/homeassistant/components/switch_as_x/entity.py", line 80, in async_turn_on
await self.hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1787, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1824, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 968, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 720, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/iaqualink/__init__.py", line 195, in wrapper
await func(self, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/iaqualink/switch.py", line 59, in async_turn_on
await await_or_reraise(self.dev.turn_on())
File "/usr/src/homeassistant/homeassistant/components/iaqualink/utils.py", line 14, in await_or_reraise
await awaitable
File "/usr/local/lib/python3.10/site-packages/iaqualink/systems/iaqua/device.py", line 130, in turn_on
await self._toggle()
File "/usr/local/lib/python3.10/site-packages/iaqualink/systems/iaqua/device.py", line 147, in _toggle
await self.system.set_aux(self.data["aux"])
File "/usr/local/lib/python3.10/site-packages/iaqualink/systems/iaqua/system.py", line 174, in set_aux
r = await self._send_session_request(aux)
File "/usr/local/lib/python3.10/site-packages/iaqualink/systems/iaqua/system.py", line 72, in _send_session_request
return await self.aqualink.send_request(url)
File "/usr/local/lib/python3.10/site-packages/iaqualink/client.py", line 98, in send_request
r = await self._client.request(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1620, in send
response = await self._send_handling_auth(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1648, in _send_handling_auth
response = await self._send_handling_redirects(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects
response = await self._send_single_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1722, in _send_single_request
response = await transport.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
with map_httpcore_exceptions():
File "/usr/local/lib/python3.10/contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.RemoteProtocolError: <ConnectionTerminated error_code:ErrorCodes.NO_ERROR, last_stream_id:965, additional_data:None>
```
### Additional information
_No response_