Move epsonworkforce imports at top-level (#29086)
This commit is contained in:
1 parent
970a80216d
commit
12c396fb19
1 file changed
+1
-2
@@ -2,6 +2,7 @@
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from epsonprinter_pkg.epsonprinterapi import EpsonPrinterAPI
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
@@ -34,8 +35,6 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
"""Set up the cartridge sensor."""
|
||||
host = config.get(CONF_HOST)
|
||||
|
||||
from epsonprinter_pkg.epsonprinterapi import EpsonPrinterAPI
|
||||
|
||||
api = EpsonPrinterAPI(host)
|
||||
if not api.available:
|
||||
raise PlatformNotReady()
|
||||
|
||||
Reference in new issue
Block a user