async def show_status(s_session, host, ssl, username, password): # pylint: disable=invalid-name """Show status.""" api = pynrf905api.nRF905API(session=s_session, host=host, ssl=ssl, username=username, password=password) await api.get_status() print(json.dumps(api.result, indent=1))
async def set_speed(s_session, host, ssl, username, password, txaddr, payload): # pylint: disable=invalid-name """Show status.""" api = pynrf905api.nRF905API(session=s_session, host=host, ssl=ssl, username=username, password=password) await api.send(txaddr, payload) print(json.dumps(api.result, indent=1))
async def queryDevice(session, host, ssl, username, password): # pylint: disable=invalid-name """Show status.""" api = pynrf905api.nRF905API(session=session, host=host, ssl=ssl, username=username, password=password) await api.fan_querydevice() print(json.dumps(api.result, indent=1))
async def fan_config(s_session, host, ssl, username, password, model, network, main_unit_id, device_id): # pylint: disable=invalid-name """Show status.""" api = pynrf905api.nRF905API(session=s_session, host=host, ssl=ssl, username=username, password=password, model=model, network=network, main_unit_id=main_unit_id, device_id=device_id) await api.fan_config() print(json.dumps(api.result, indent=1))