Bump aiostreammagic to 2.10.0 (#131415)

This commit is contained in:
Noah Husby 2024-11-24 18:35:34 -05:00 committed by GitHub
parent 9f8a656eff
commit dc4a2d6f33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 6 deletions

View File

@ -12,6 +12,7 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, Platform from homeassistant.const import CONF_HOST, Platform
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from .const import CONNECT_TIMEOUT, DOMAIN, STREAM_MAGIC_EXCEPTIONS from .const import CONNECT_TIMEOUT, DOMAIN, STREAM_MAGIC_EXCEPTIONS
@ -27,7 +28,7 @@ async def async_setup_entry(
) -> bool: ) -> bool:
"""Set up Cambridge Audio integration from a config entry.""" """Set up Cambridge Audio integration from a config entry."""
client = StreamMagicClient(entry.data[CONF_HOST]) client = StreamMagicClient(entry.data[CONF_HOST], async_get_clientsession(hass))
async def _connection_update_callback( async def _connection_update_callback(
_client: StreamMagicClient, _callback_type: CallbackType _client: StreamMagicClient, _callback_type: CallbackType

View File

@ -9,6 +9,7 @@ import voluptuous as vol
from homeassistant.components import zeroconf from homeassistant.components import zeroconf
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
from homeassistant.const import CONF_HOST, CONF_NAME from homeassistant.const import CONF_HOST, CONF_NAME
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from .const import CONNECT_TIMEOUT, DOMAIN, STREAM_MAGIC_EXCEPTIONS from .const import CONNECT_TIMEOUT, DOMAIN, STREAM_MAGIC_EXCEPTIONS
@ -30,7 +31,7 @@ class CambridgeAudioConfigFlow(ConfigFlow, domain=DOMAIN):
await self.async_set_unique_id(discovery_info.properties["serial"]) await self.async_set_unique_id(discovery_info.properties["serial"])
self._abort_if_unique_id_configured(updates={CONF_HOST: host}) self._abort_if_unique_id_configured(updates={CONF_HOST: host})
client = StreamMagicClient(host) client = StreamMagicClient(host, async_get_clientsession(self.hass))
try: try:
async with asyncio.timeout(CONNECT_TIMEOUT): async with asyncio.timeout(CONNECT_TIMEOUT):
await client.connect() await client.connect()
@ -69,7 +70,9 @@ class CambridgeAudioConfigFlow(ConfigFlow, domain=DOMAIN):
"""Handle a flow initialized by the user.""" """Handle a flow initialized by the user."""
errors: dict[str, str] = {} errors: dict[str, str] = {}
if user_input: if user_input:
client = StreamMagicClient(user_input[CONF_HOST]) client = StreamMagicClient(
user_input[CONF_HOST], async_get_clientsession(self.hass)
)
try: try:
async with asyncio.timeout(CONNECT_TIMEOUT): async with asyncio.timeout(CONNECT_TIMEOUT):
await client.connect() await client.connect()

View File

@ -7,6 +7,6 @@
"integration_type": "device", "integration_type": "device",
"iot_class": "local_push", "iot_class": "local_push",
"loggers": ["aiostreammagic"], "loggers": ["aiostreammagic"],
"requirements": ["aiostreammagic==2.8.6"], "requirements": ["aiostreammagic==2.10.0"],
"zeroconf": ["_stream-magic._tcp.local.", "_smoip._tcp.local."] "zeroconf": ["_stream-magic._tcp.local.", "_smoip._tcp.local."]
} }

View File

@ -384,7 +384,7 @@ aiosolaredge==0.2.0
aiosteamist==1.0.0 aiosteamist==1.0.0
# homeassistant.components.cambridge_audio # homeassistant.components.cambridge_audio
aiostreammagic==2.8.6 aiostreammagic==2.10.0
# homeassistant.components.switcher_kis # homeassistant.components.switcher_kis
aioswitcher==5.0.0 aioswitcher==5.0.0

View File

@ -366,7 +366,7 @@ aiosolaredge==0.2.0
aiosteamist==1.0.0 aiosteamist==1.0.0
# homeassistant.components.cambridge_audio # homeassistant.components.cambridge_audio
aiostreammagic==2.8.6 aiostreammagic==2.10.0
# homeassistant.components.switcher_kis # homeassistant.components.switcher_kis
aioswitcher==5.0.0 aioswitcher==5.0.0