Move imports in panasonic_viera component (#27665)
parent
75eb33eb70
commit
487a5b2527
|
@ -1,9 +1,11 @@
|
||||||
"""Support for interface with a Panasonic Viera TV."""
|
"""Support for interface with a Panasonic Viera TV."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from panasonic_viera import RemoteControl
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
import wakeonlan
|
||||||
|
|
||||||
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 (
|
from homeassistant.components.media_player.const import (
|
||||||
MEDIA_TYPE_URL,
|
MEDIA_TYPE_URL,
|
||||||
SUPPORT_NEXT_TRACK,
|
SUPPORT_NEXT_TRACK,
|
||||||
|
@ -62,8 +64,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up the Panasonic Viera TV platform."""
|
"""Set up the Panasonic Viera TV platform."""
|
||||||
from panasonic_viera import RemoteControl
|
|
||||||
|
|
||||||
mac = config.get(CONF_MAC)
|
mac = config.get(CONF_MAC)
|
||||||
name = config.get(CONF_NAME)
|
name = config.get(CONF_NAME)
|
||||||
port = config.get(CONF_PORT)
|
port = config.get(CONF_PORT)
|
||||||
|
@ -95,8 +95,6 @@ class PanasonicVieraTVDevice(MediaPlayerDevice):
|
||||||
|
|
||||||
def __init__(self, mac, name, remote, host, app_power, uuid=None):
|
def __init__(self, mac, name, remote, host, app_power, uuid=None):
|
||||||
"""Initialize the Panasonic device."""
|
"""Initialize the Panasonic device."""
|
||||||
import wakeonlan
|
|
||||||
|
|
||||||
# Save a reference to the imported class
|
# Save a reference to the imported class
|
||||||
self._wol = wakeonlan
|
self._wol = wakeonlan
|
||||||
self._mac = mac
|
self._mac = mac
|
||||||
|
|
Loading…
Reference in New Issue