mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Order imports (#21117)
This commit is contained in:
parent
f7d9031486
commit
1a6c79d5e2
@ -3,12 +3,13 @@ import logging
|
|||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import (CONF_USERNAME, CONF_PASSWORD, CONF_NAME)
|
from homeassistant.const import CONF_NAME, CONF_PASSWORD, CONF_USERNAME
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.discovery import load_platform
|
from homeassistant.helpers.discovery import load_platform
|
||||||
|
|
||||||
from .const import SENSOR_MOVEMENT, SENSOR_BASE_STATION, SENSOR_HEART_RATE, \
|
from .const import (
|
||||||
SENSOR_OXYGEN_LEVEL
|
SENSOR_BASE_STATION, SENSOR_HEART_RATE, SENSOR_MOVEMENT,
|
||||||
|
SENSOR_OXYGEN_LEVEL)
|
||||||
|
|
||||||
REQUIREMENTS = ['pyowlet==1.0.2']
|
REQUIREMENTS = ['pyowlet==1.0.2']
|
||||||
|
|
||||||
@ -20,7 +21,7 @@ SENSOR_TYPES = [
|
|||||||
SENSOR_OXYGEN_LEVEL,
|
SENSOR_OXYGEN_LEVEL,
|
||||||
SENSOR_HEART_RATE,
|
SENSOR_HEART_RATE,
|
||||||
SENSOR_BASE_STATION,
|
SENSOR_BASE_STATION,
|
||||||
SENSOR_MOVEMENT
|
SENSOR_MOVEMENT,
|
||||||
]
|
]
|
||||||
|
|
||||||
CONFIG_SCHEMA = vol.Schema({
|
CONFIG_SCHEMA = vol.Schema({
|
||||||
@ -43,8 +44,8 @@ def setup(hass, config):
|
|||||||
try:
|
try:
|
||||||
device = PyOwlet(username, password)
|
device = PyOwlet(username, password)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
_LOGGER.error('Owlet authentication failed. Please verify your '
|
_LOGGER.error("Owlet authentication failed. Please verify your "
|
||||||
'credentials are correct.')
|
"credentials are correct")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
device.update_properties()
|
device.update_properties()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user