def __init__(self, hass, host, port, password): """Init the Asterisk data object.""" from asterisk_mbox import Client as asteriskClient self.hass = hass self.client = asteriskClient(host, port, password, self.handle_data) self.messages = [] async_dispatcher_connect( self.hass, SIGNAL_MESSAGE_REQUEST, self._request_messages)
def __init__(self, hass, host, port, password, config): """Init the Asterisk data object.""" from asterisk_mbox import Client as asteriskClient self.hass = hass self.config = config self.messages = None self.cdr = None dispatcher_connect(self.hass, SIGNAL_MESSAGE_REQUEST, self._request_messages) dispatcher_connect(self.hass, SIGNAL_CDR_REQUEST, self._request_cdr) dispatcher_connect(self.hass, SIGNAL_DISCOVER_PLATFORM, self._discover_platform) # Only connect after signal connection to ensure we don't miss any self.client = asteriskClient(host, port, password, self.handle_data)
def __init__(self, hass, host, port, password, config): """Init the Asterisk data object.""" from asterisk_mbox import Client as asteriskClient self.hass = hass self.config = config self.messages = None self.cdr = None dispatcher_connect( self.hass, SIGNAL_MESSAGE_REQUEST, self._request_messages) dispatcher_connect( self.hass, SIGNAL_CDR_REQUEST, self._request_cdr) dispatcher_connect( self.hass, SIGNAL_DISCOVER_PLATFORM, self._discover_platform) # Only connect after signal connection to ensure we don't miss any self.client = asteriskClient(host, port, password, self.handle_data)