Black
This commit is contained in:
1 parent
da05dfe708
commit
4de97abc3a
2676 files changed
+163166
-140084
No files matched your search
@@ -9,21 +9,19 @@ from . import VelbusEntity
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_platform(
|
||||
hass, config, async_add_entities, discovery_info=None):
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
"""Old way."""
|
||||
pass
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry, async_add_entities):
|
||||
"""Set up Velbus binary sensor based on config_entry."""
|
||||
cntrl = hass.data[DOMAIN][entry.entry_id]['cntrl']
|
||||
modules_data = hass.data[DOMAIN][entry.entry_id]['binary_sensor']
|
||||
cntrl = hass.data[DOMAIN][entry.entry_id]["cntrl"]
|
||||
modules_data = hass.data[DOMAIN][entry.entry_id]["binary_sensor"]
|
||||
entities = []
|
||||
for address, channel in modules_data:
|
||||
module = cntrl.get_module(address)
|
||||
entities.append(
|
||||
VelbusBinarySensor(module, channel))
|
||||
entities.append(VelbusBinarySensor(module, channel))
|
||||
async_add_entities(entities)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user