mirror of
https://github.com/elisspace/core.git
synced 2026-10-05 00:36:19 +00:00
Tellduslive refactoring (#18780)
* move component to a package * move TelldusLiveEntry to separate file * refactor * move entities from a shared container * using the dispatch helper instead for communication between component and platforms * updated covereagerc and codeowners * suggestions from MartinHjelmare * don't make update async * "Strip is good!"
This commit is contained in:
committed by
Martin Hjelmare
parent
a6511fc0b9
commit
d6a4e106a9
@@ -9,8 +9,9 @@ https://home-assistant.io/components/binary_sensor.tellduslive/
|
||||
"""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.tellduslive import TelldusLiveEntity
|
||||
from homeassistant.components import tellduslive
|
||||
from homeassistant.components.binary_sensor import BinarySensorDevice
|
||||
from homeassistant.components.tellduslive.entry import TelldusLiveEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -19,8 +20,9 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up Tellstick sensors."""
|
||||
if discovery_info is None:
|
||||
return
|
||||
client = hass.data[tellduslive.DOMAIN]
|
||||
add_entities(
|
||||
TelldusLiveSensor(hass, binary_sensor)
|
||||
TelldusLiveSensor(client, binary_sensor)
|
||||
for binary_sensor in discovery_info
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user