Move imports in w800rf32 component (#27451)

This commit is contained in:
Quentame authored and Paulus Schoutsen committed 2019-10-12 13:03:02 -07:00
1 parent e9642a0f65
commit 72b711fde6
2 files changed
+3 -4

No files matched your search

@@ -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):
@@ -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