Move imports in vizio component (#27452)
This commit is contained in:
parent
de4482e8d3
commit
3d05228ec1
1 changed files with 4 additions and 2 deletions
|
@ -1,7 +1,10 @@
|
|||
"""Vizio SmartCast Device support."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
from pyvizio import Vizio
|
||||
|
||||
from homeassistant import util
|
||||
from homeassistant.components.media_player import MediaPlayerDevice, PLATFORM_SCHEMA
|
||||
from homeassistant.components.media_player.const import (
|
||||
|
@ -122,7 +125,6 @@ class VizioDevice(MediaPlayerDevice):
|
|||
|
||||
def __init__(self, host, token, name, volume_step, device_type):
|
||||
"""Initialize Vizio device."""
|
||||
import pyvizio
|
||||
|
||||
self._name = name
|
||||
self._state = None
|
||||
|
@ -132,7 +134,7 @@ class VizioDevice(MediaPlayerDevice):
|
|||
self._available_inputs = None
|
||||
self._device_type = device_type
|
||||
self._supported_commands = SUPPORTED_COMMANDS[device_type]
|
||||
self._device = pyvizio.Vizio(DEVICE_ID, host, DEFAULT_NAME, token, device_type)
|
||||
self._device = Vizio(DEVICE_ID, host, DEFAULT_NAME, token, device_type)
|
||||
self._max_volume = float(self._device.get_max_volume())
|
||||
|
||||
@util.Throttle(MIN_TIME_BETWEEN_SCANS, MIN_TIME_BETWEEN_FORCED_SCANS)
|
||||
|
|
Loading…
Add table
Reference in a new issue