mirror of
https://github.com/home-assistant/core.git
synced 2026-12-03 04:08:19 -04:00
Bump marantz-rs232 to 2.1.1 to retry serial connection failures (#186966)
This commit is contained in:
@@ -9,5 +9,5 @@
|
||||
"iot_class": "local_push",
|
||||
"loggers": ["marantz_rs232"],
|
||||
"quality_scale": "bronze",
|
||||
"requirements": ["marantz-rs232==2.1.0"]
|
||||
"requirements": ["marantz-rs232==2.1.1"]
|
||||
}
|
||||
|
||||
Generated
+1
-1
@@ -1593,7 +1593,7 @@ lxml==6.1.2
|
||||
lyngdorf==2.2.1
|
||||
|
||||
# homeassistant.components.marantz_rs232
|
||||
marantz-rs232==2.1.0
|
||||
marantz-rs232==2.1.1
|
||||
|
||||
# homeassistant.components.matrix
|
||||
matrix-nio==0.26.0
|
||||
|
||||
@@ -9,6 +9,7 @@ from unittest.mock import MagicMock, patch
|
||||
from freezegun.api import FrozenDateTimeFactory
|
||||
from marantz_rs232 import V2007ReceiverState
|
||||
import pytest
|
||||
from serialx import SerialException
|
||||
|
||||
from homeassistant.components.marantz_rs232.const import DOMAIN
|
||||
from homeassistant.config_entries import ConfigEntryState
|
||||
@@ -191,3 +192,19 @@ async def test_generic_receiver(
|
||||
assert device.manufacturer == "Marantz"
|
||||
assert device.model is None
|
||||
assert device.model_id is None
|
||||
|
||||
|
||||
async def test_setup_serial_connection_error(
|
||||
hass: HomeAssistant,
|
||||
mock_config_entry: MockConfigEntry,
|
||||
) -> None:
|
||||
"""Retry setup when the serial transport cannot be opened."""
|
||||
mock_config_entry.add_to_hass(hass)
|
||||
with patch(
|
||||
"serialx.open_serial_connection",
|
||||
side_effect=SerialException("Serial proxy is unavailable"),
|
||||
):
|
||||
await hass.config_entries.async_setup(mock_config_entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert mock_config_entry.state is ConfigEntryState.SETUP_RETRY
|
||||
|
||||
Reference in New Issue
Block a user