NS
Size: a a a
NS
IB
IB
NS
NS
IB
IB
IB
NS
NS
NS
IB
NS
NS
NS
IB
__init__.py
IB
def async_setup_service(hass, host, device):
"""Register a device for given host for use in services."""
hass.data.setdefault(DOMAIN, {})[host] = device
if not hass.services.has_service(DOMAIN, SERVICE_LEARN):
async def _learn_command(call):
"""Learn a packet from remote."""
device = hass.data[DOMAIN][call.data[CONF_HOST]]
try:
#auth = await hass.async_add_executor_job(device.auth)
auth = device.auth
except socket.timeout:
NS