Move imports in w800rf32 component (#27451)

This commit is contained in:
Quentame 2019-10-12 22:03:02 +02:00 committed by Paulus Schoutsen
parent e9642a0f65
commit 72b711fde6
2 changed files with 3 additions and 4 deletions

View file

@ -2,6 +2,7 @@
import logging
import voluptuous as vol
import W800rf32 as w800
from homeassistant.const import (
CONF_DEVICE,
@ -26,8 +27,6 @@ CONFIG_SCHEMA = vol.Schema(
def setup(hass, config):
"""Set up the w800rf32 component."""
# Try to load the W800rf32 module.
import W800rf32 as w800
# Declare the Handle event
def handle_receive(event):

View file

@ -2,6 +2,7 @@
import logging
import voluptuous as vol
import W800rf32 as w800
from homeassistant.components.binary_sensor import (
DEVICE_CLASSES_SCHEMA,
@ -104,9 +105,8 @@ class W800rf32BinarySensor(BinarySensorDevice):
@callback
def binary_sensor_update(self, event):
"""Call for control updates from the w800rf32 gateway."""
import W800rf32 as w800rf32mod
if not isinstance(event, w800rf32mod.W800rf32Event):
if not isinstance(event, w800.W800rf32Event):
return
dev_id = event.device