Move imports in dte_energy_bridge component (#27975)
This commit is contained in:
parent
425e7fd1a7
commit
c44163548d
1 changed files with 3 additions and 4 deletions
|
@ -1,12 +1,13 @@
|
||||||
"""Support for monitoring energy usage using the DTE energy bridge."""
|
"""Support for monitoring energy usage using the DTE energy bridge."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
import requests
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.helpers.entity import Entity
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.const import CONF_NAME
|
from homeassistant.const import CONF_NAME
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -78,8 +79,6 @@ class DteEnergyBridgeSensor(Entity):
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
"""Get the energy usage data from the DTE energy bridge."""
|
"""Get the energy usage data from the DTE energy bridge."""
|
||||||
import requests
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
response = requests.get(self._url, timeout=5)
|
response = requests.get(self._url, timeout=5)
|
||||||
except (requests.exceptions.RequestException, ValueError):
|
except (requests.exceptions.RequestException, ValueError):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue