mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
Move imports in shiftr component (#28097)
This commit is contained in:
parent
d9cb9601aa
commit
953f31dd55
@ -1,16 +1,17 @@
|
|||||||
"""Support for Shiftr.io."""
|
"""Support for Shiftr.io."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
import paho.mqtt.client as mqtt
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_PASSWORD,
|
CONF_PASSWORD,
|
||||||
CONF_USERNAME,
|
CONF_USERNAME,
|
||||||
EVENT_STATE_CHANGED,
|
|
||||||
EVENT_HOMEASSISTANT_STOP,
|
EVENT_HOMEASSISTANT_STOP,
|
||||||
|
EVENT_STATE_CHANGED,
|
||||||
)
|
)
|
||||||
from homeassistant.helpers import state as state_helper
|
from homeassistant.helpers import state as state_helper
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -33,8 +34,6 @@ CONFIG_SCHEMA = vol.Schema(
|
|||||||
|
|
||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
"""Initialize the Shiftr.io MQTT consumer."""
|
"""Initialize the Shiftr.io MQTT consumer."""
|
||||||
import paho.mqtt.client as mqtt
|
|
||||||
|
|
||||||
conf = config[DOMAIN]
|
conf = config[DOMAIN]
|
||||||
username = conf.get(CONF_USERNAME)
|
username = conf.get(CONF_USERNAME)
|
||||||
password = conf.get(CONF_PASSWORD)
|
password = conf.get(CONF_PASSWORD)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user