1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 05:26:47 +00:00

Use relative imports inside integrations (#22235)

* Use relative imports inside integrations

* Lint

* Fix automation tests

* Fix scene imports
This commit is contained in:
Paulus Schoutsen
2019-03-20 22:56:46 -07:00
committed by GitHub
parent ab17b22239
commit 4b1de61110
522 changed files with 1834 additions and 1725 deletions

View File

@@ -3,11 +3,12 @@ import logging
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
from homeassistant.const import CONF_MONITORED_CONDITIONS
from homeassistant.core import callback
import homeassistant.components.aqualogic as aq
from homeassistant.components.switch import SwitchDevice, PLATFORM_SCHEMA
from homeassistant.const import (CONF_MONITORED_CONDITIONS)
import homeassistant.helpers.config_validation as cv
from . import DOMAIN, UPDATE_TOPIC
DEPENDENCIES = ['aqualogic']
@@ -37,7 +38,7 @@ async def async_setup_platform(
"""Set up the switch platform."""
switches = []
processor = hass.data[aq.DOMAIN]
processor = hass.data[DOMAIN]
for switch_type in config.get(CONF_MONITORED_CONDITIONS):
switches.append(AquaLogicSwitch(processor, switch_type))
@@ -101,7 +102,7 @@ class AquaLogicSwitch(SwitchDevice):
async def async_added_to_hass(self):
"""Register callbacks."""
self.hass.helpers.dispatcher.async_dispatcher_connect(
aq.UPDATE_TOPIC, self.async_update_callback)
UPDATE_TOPIC, self.async_update_callback)
@callback
def async_update_callback(self):