def setup_platform(hass, config, add_devices, discovery_info=None): """Set up modem caller ID sensor platform.""" from basicmodem.basicmodem import BasicModem as bm name = config.get(CONF_NAME) port = config.get(CONF_DEVICE) modem = bm(port) if modem.state == modem.STATE_FAILED: _LOGGER.error('Unable to initialize modem.') return add_devices([ModemCalleridSensor(hass, name, port, modem)])
def setup_platform(opp, config, add_entities, discovery_info=None): """Set up modem caller ID sensor platform.""" name = config.get(CONF_NAME) port = config.get(CONF_DEVICE) modem = bm(port) if modem.state == modem.STATE_FAILED: _LOGGER.error("Unable to initialize modem") return add_entities([ModemCalleridSensor(opp, name, port, modem)])
def setup_platform(hass, config, add_entities, discovery_info=None): """Set up modem caller ID sensor platform.""" from basicmodem.basicmodem import BasicModem as bm name = config.get(CONF_NAME) port = config.get(CONF_DEVICE) modem = bm(port) if modem.state == modem.STATE_FAILED: _LOGGER.error('Unable to initialize modem.') return add_entities([ModemCalleridSensor(hass, name, port, modem)])