Black
This commit is contained in:
1 parent
da05dfe708
commit
4de97abc3a
2676 files changed
+163166
-140084
No files matched your search
@@ -8,17 +8,19 @@ from . import InsteonEntity
|
||||
_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):
|
||||
"""Set up the INSTEON device class for the hass platform."""
|
||||
insteon_modem = hass.data['insteon'].get('modem')
|
||||
insteon_modem = hass.data["insteon"].get("modem")
|
||||
|
||||
address = discovery_info['address']
|
||||
address = discovery_info["address"]
|
||||
device = insteon_modem.devices[address]
|
||||
state_key = discovery_info['state_key']
|
||||
state_key = discovery_info["state_key"]
|
||||
|
||||
_LOGGER.debug('Adding device %s entity %s to Sensor platform',
|
||||
device.address.hex, device.states[state_key].name)
|
||||
_LOGGER.debug(
|
||||
"Adding device %s entity %s to Sensor platform",
|
||||
device.address.hex,
|
||||
device.states[state_key].name,
|
||||
)
|
||||
|
||||
new_entity = InsteonSensorDevice(device, state_key)
|
||||
|
||||
|
||||
Reference in new issue
Block a user