mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Move imports to top for duke_energy (#29445)
This commit is contained in:
parent
94297e96cb
commit
f2a08c438b
@ -1,12 +1,13 @@
|
|||||||
"""Support for Duke Energy Gas and Electric meters."""
|
"""Support for Duke Energy Gas and Electric meters."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from pydukeenergy.api import DukeEnergy, DukeEnergyException
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
from homeassistant.const import CONF_USERNAME, CONF_PASSWORD
|
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
||||||
from homeassistant.helpers.entity import Entity
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -21,7 +22,6 @@ LAST_BILL_DAYS_BILLED = "last_bills_days_billed"
|
|||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up all Duke Energy meters."""
|
"""Set up all Duke Energy meters."""
|
||||||
from pydukeenergy.api import DukeEnergy, DukeEnergyException
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
duke = DukeEnergy(
|
duke = DukeEnergy(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user