From 72b711fde62a80230e1eef09ad7c7523950e9eea Mon Sep 17 00:00:00 2001 From: Quentame Date: Sat, 12 Oct 2019 22:03:02 +0200 Subject: [PATCH] Move imports in w800rf32 component (#27451) --- homeassistant/components/w800rf32/__init__.py | 3 +-- homeassistant/components/w800rf32/binary_sensor.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/w800rf32/__init__.py b/homeassistant/components/w800rf32/__init__.py index 9f15e0b2aa1..805cca47023 100644 --- a/homeassistant/components/w800rf32/__init__.py +++ b/homeassistant/components/w800rf32/__init__.py @@ -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): diff --git a/homeassistant/components/w800rf32/binary_sensor.py b/homeassistant/components/w800rf32/binary_sensor.py index f1f1890f7aa..e08111da8ba 100644 --- a/homeassistant/components/w800rf32/binary_sensor.py +++ b/homeassistant/components/w800rf32/binary_sensor.py @@ -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