diff --git a/homeassistant/components/pilight/binary_sensor.py b/homeassistant/components/pilight/binary_sensor.py index 4d68748e0f7..0a94147af70 100644 --- a/homeassistant/components/pilight/binary_sensor.py +++ b/homeassistant/components/pilight/binary_sensor.py @@ -24,7 +24,7 @@ from homeassistant.helpers.event import track_point_in_time from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType from homeassistant.util import dt as dt_util -from .. import pilight +from . import EVENT CONF_VARIABLE = "variable" CONF_RESET_DELAY_SEC = "reset_delay_sec" @@ -96,7 +96,7 @@ class PilightBinarySensor(BinarySensorEntity): self._on_value = on_value self._off_value = off_value - hass.bus.listen(pilight.EVENT, self._handle_code) + hass.bus.listen(EVENT, self._handle_code) @property def name(self): @@ -150,7 +150,7 @@ class PilightTriggerSensor(BinarySensorEntity): self._delay_after = None self._hass = hass - hass.bus.listen(pilight.EVENT, self._handle_code) + hass.bus.listen(EVENT, self._handle_code) @property def name(self): diff --git a/homeassistant/components/pilight/sensor.py b/homeassistant/components/pilight/sensor.py index 8e5f3b7d78a..5ab80f57dc6 100644 --- a/homeassistant/components/pilight/sensor.py +++ b/homeassistant/components/pilight/sensor.py @@ -16,7 +16,7 @@ import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType -from .. import pilight +from . import EVENT _LOGGER = logging.getLogger(__name__) @@ -67,7 +67,7 @@ class PilightSensor(SensorEntity): self._payload = payload self._unit_of_measurement = unit_of_measurement - hass.bus.listen(pilight.EVENT, self._handle_code) + hass.bus.listen(EVENT, self._handle_code) @property def name(self):