mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +00:00
Simplify imports in pilight (#125747)
This commit is contained in:
parent
e140a2980b
commit
a7b6652fba
@ -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):
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user