Files
core/tests/components
J. Nick Koston d009f06a55 Handle connection being closed in legacy samsungtv (#52137)
* Handle connection being closed in legacy samsungtv

- Mirror the websocket behavior

Fixes
```
2021-06-24 02:54:13 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.89_guestroom fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 401, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 609, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/samsungtv/media_player.py", line 124, in update
    self._state = STATE_ON if self._bridge.is_on() else STATE_OFF
  File "/usr/src/homeassistant/homeassistant/components/samsungtv/bridge.py", line 113, in is_on
    return self._get_remote() is not None
  File "/usr/src/homeassistant/homeassistant/components/samsungtv/bridge.py", line 232, in _get_remote
    self._remote = Remote(self.config.copy())
  File "/usr/local/lib/python3.8/site-packages/samsungctl/remote.py", line 9, in __init__
    self.remote = RemoteLegacy(config)
  File "/usr/local/lib/python3.8/site-packages/samsungctl/remote_legacy.py", line 32, in __init__
    self._read_response(True)
  File "/usr/local/lib/python3.8/site-packages/samsungctl/remote_legacy.py", line 77, in _read_response
    raise exceptions.ConnectionClosed()
samsungctl.exceptions.ConnectionClosed
```

* add coverage

* pass instead
2021-06-25 07:31:44 +02:00
..
2021-01-01 22:31:56 +01:00
2021-06-01 15:09:23 +02:00
2021-03-18 15:13:22 +01:00
2021-03-11 23:18:09 -08:00
2021-01-01 22:31:56 +01:00
2021-06-11 15:05:57 +02:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-03-18 15:13:22 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-11 13:35:03 +02:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-02 21:25:15 +02:00
2021-01-01 22:31:56 +01:00
2021-06-11 13:35:03 +02:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-11 13:35:03 +02:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-11 13:35:03 +02:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-11 13:35:03 +02:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-11 13:35:03 +02:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-24 17:09:06 +02:00
2021-01-01 22:31:56 +01:00
2021-02-28 14:16:37 +01:00
2021-01-01 22:31:56 +01:00
2021-04-27 13:44:59 -07:00
2021-02-08 14:44:46 +01:00
2021-05-02 21:52:48 -07:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-23 15:51:27 +02:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-03-02 09:02:04 +01:00
2021-05-24 15:27:40 -04:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-17 09:02:23 +02:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-15 20:34:05 -05:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-11 13:35:03 +02:00
2021-05-27 15:35:17 +02:00
2021-05-27 12:53:14 +02:00
2021-01-01 22:31:56 +01:00
2021-05-15 20:22:32 +02:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-11 13:35:03 +02:00
2021-06-20 13:38:02 +08:00
2021-06-11 13:35:03 +02:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-11 13:35:03 +02:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-03-18 15:13:22 +01:00
2021-01-01 22:31:56 +01:00
2021-03-19 15:54:07 +01:00
2021-01-01 22:31:56 +01:00
2021-06-11 13:35:03 +02:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-11 13:35:03 +02:00
2021-06-24 23:16:07 +02:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-01-01 22:31:56 +01:00
2021-06-11 13:35:03 +02:00
2021-01-01 22:31:56 +01:00
2021-06-11 13:35:03 +02:00
2021-01-01 22:31:56 +01:00