mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Move epsonworkforce imports at top-level (#29086)
This commit is contained in:
parent
970a80216d
commit
12c396fb19
@ -2,6 +2,7 @@
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from epsonprinter_pkg.epsonprinterapi import EpsonPrinterAPI
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
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."""
|
"""Set up the cartridge sensor."""
|
||||||
host = config.get(CONF_HOST)
|
host = config.get(CONF_HOST)
|
||||||
|
|
||||||
from epsonprinter_pkg.epsonprinterapi import EpsonPrinterAPI
|
|
||||||
|
|
||||||
api = EpsonPrinterAPI(host)
|
api = EpsonPrinterAPI(host)
|
||||||
if not api.available:
|
if not api.available:
|
||||||
raise PlatformNotReady()
|
raise PlatformNotReady()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user