Move imports in liveboxplaytv component (#27790)

This commit is contained in:
Quentame
2019-10-17 15:00:32 +02:00
committed by Pascal Vizeli
parent 4efa6689e4
commit dc72aa48da

View File

@@ -2,6 +2,8 @@
from datetime import timedelta from datetime import timedelta
import logging import logging
from liveboxplaytv import LiveboxPlayTv
import pyteleloisirs
import requests import requests
import voluptuous as vol import voluptuous as vol
@@ -85,7 +87,6 @@ class LiveboxPlayTvDevice(MediaPlayerDevice):
def __init__(self, host, port, name): def __init__(self, host, port, name):
"""Initialize the Livebox Play TV device.""" """Initialize the Livebox Play TV device."""
from liveboxplaytv import LiveboxPlayTv
self._client = LiveboxPlayTv(host, port) self._client = LiveboxPlayTv(host, port)
# Assume that the appliance is not muted # Assume that the appliance is not muted
@@ -103,7 +104,6 @@ class LiveboxPlayTvDevice(MediaPlayerDevice):
async def async_update(self): async def async_update(self):
"""Retrieve the latest data.""" """Retrieve the latest data."""
import pyteleloisirs
try: try:
self._state = self.refresh_state() self._state = self.refresh_state()