mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Bump aiostreammagic to 2.10.0 (#131415)
This commit is contained in:
parent
9f8a656eff
commit
dc4a2d6f33
@ -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
|
||||||
|
@ -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()
|
||||||
|
@ -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."]
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user