mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Move imports to top for satel_integra (#29263)
This commit is contained in:
parent
4ceddc6d35
commit
11b274989a
@ -2,9 +2,10 @@
|
|||||||
import collections
|
import collections
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from satel_integra.satel_integra import AsyncSatel
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import EVENT_HOMEASSISTANT_STOP, CONF_HOST, CONF_PORT
|
from homeassistant.const import CONF_HOST, CONF_PORT, EVENT_HOMEASSISTANT_STOP
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
from homeassistant.helpers import config_validation as cv
|
from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.discovery import async_load_platform
|
from homeassistant.helpers.discovery import async_load_platform
|
||||||
@ -102,8 +103,6 @@ async def async_setup(hass, config):
|
|||||||
port = conf.get(CONF_PORT)
|
port = conf.get(CONF_PORT)
|
||||||
partitions = conf.get(CONF_DEVICE_PARTITIONS)
|
partitions = conf.get(CONF_DEVICE_PARTITIONS)
|
||||||
|
|
||||||
from satel_integra.satel_integra import AsyncSatel
|
|
||||||
|
|
||||||
monitored_outputs = collections.OrderedDict(
|
monitored_outputs = collections.OrderedDict(
|
||||||
list(outputs.items()) + list(switchable_outputs.items())
|
list(outputs.items()) + list(switchable_outputs.items())
|
||||||
)
|
)
|
||||||
|
@ -3,6 +3,8 @@ import asyncio
|
|||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from satel_integra.satel_integra import AlarmState
|
||||||
|
|
||||||
import homeassistant.components.alarm_control_panel as alarm
|
import homeassistant.components.alarm_control_panel as alarm
|
||||||
from homeassistant.components.alarm_control_panel.const import (
|
from homeassistant.components.alarm_control_panel.const import (
|
||||||
SUPPORT_ALARM_ARM_AWAY,
|
SUPPORT_ALARM_ARM_AWAY,
|
||||||
@ -82,7 +84,6 @@ class SatelIntegraAlarmPanel(alarm.AlarmControlPanel):
|
|||||||
|
|
||||||
def _read_alarm_state(self):
|
def _read_alarm_state(self):
|
||||||
"""Read current status of the alarm and translate it into HA status."""
|
"""Read current status of the alarm and translate it into HA status."""
|
||||||
from satel_integra.satel_integra import AlarmState
|
|
||||||
|
|
||||||
# Default - disarmed:
|
# Default - disarmed:
|
||||||
hass_alarm_status = STATE_ALARM_DISARMED
|
hass_alarm_status = STATE_ALARM_DISARMED
|
||||||
|
@ -10,9 +10,9 @@ from . import (
|
|||||||
CONF_ZONE_NAME,
|
CONF_ZONE_NAME,
|
||||||
CONF_ZONE_TYPE,
|
CONF_ZONE_TYPE,
|
||||||
CONF_ZONES,
|
CONF_ZONES,
|
||||||
|
DATA_SATEL,
|
||||||
SIGNAL_OUTPUTS_UPDATED,
|
SIGNAL_OUTPUTS_UPDATED,
|
||||||
SIGNAL_ZONES_UPDATED,
|
SIGNAL_ZONES_UPDATED,
|
||||||
DATA_SATEL,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
@ -9,8 +9,8 @@ from . import (
|
|||||||
CONF_DEVICE_CODE,
|
CONF_DEVICE_CODE,
|
||||||
CONF_SWITCHABLE_OUTPUTS,
|
CONF_SWITCHABLE_OUTPUTS,
|
||||||
CONF_ZONE_NAME,
|
CONF_ZONE_NAME,
|
||||||
SIGNAL_OUTPUTS_UPDATED,
|
|
||||||
DATA_SATEL,
|
DATA_SATEL,
|
||||||
|
SIGNAL_OUTPUTS_UPDATED,
|
||||||
)
|
)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user