mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Move imports in bluesound component (#27502)
* moved imports to top level * changed import order * changed import order
This commit is contained in:
parent
5a83a92390
commit
2295b33204
@ -3,14 +3,16 @@ import asyncio
|
||||
from asyncio.futures import CancelledError
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
from urllib import parse
|
||||
|
||||
import aiohttp
|
||||
from aiohttp.client_exceptions import ClientError
|
||||
from aiohttp.hdrs import CONNECTION, KEEP_ALIVE
|
||||
import async_timeout
|
||||
import voluptuous as vol
|
||||
import xmltodict
|
||||
|
||||
from homeassistant.components.media_player import MediaPlayerDevice, PLATFORM_SCHEMA
|
||||
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
|
||||
from homeassistant.components.media_player.const import (
|
||||
ATTR_MEDIA_ENQUEUE,
|
||||
DOMAIN,
|
||||
@ -329,7 +331,6 @@ class BluesoundPlayer(MediaPlayerDevice):
|
||||
self, method, raise_timeout=False, allow_offline=False
|
||||
):
|
||||
"""Send command to the player."""
|
||||
import xmltodict
|
||||
|
||||
if not self._is_online and not allow_offline:
|
||||
return
|
||||
@ -370,7 +371,6 @@ class BluesoundPlayer(MediaPlayerDevice):
|
||||
|
||||
async def async_update_status(self):
|
||||
"""Use the poll session to always get the status of the player."""
|
||||
import xmltodict
|
||||
|
||||
response = None
|
||||
|
||||
@ -690,7 +690,6 @@ class BluesoundPlayer(MediaPlayerDevice):
|
||||
@property
|
||||
def source(self):
|
||||
"""Name of the current input source."""
|
||||
from urllib import parse
|
||||
|
||||
if self._status is None or (self.is_grouped and not self.is_master):
|
||||
return None
|
||||
|
Loading…
x
Reference in New Issue
Block a user