OK, I didn’t realize I had to add a component to get debug level logging, sorry.
Here is an example in which it took 6.8 seconds (this was how long it took to get a response according to Python) to turn a light off via the API. Watching my computer’s clock, I sent the request to turn the light on at 16:29:49 and it turned on at 16:29:50 after which I immediately sent the request to turn it off at 16:29:50 and it finally turned off at 16:29:57
2020-10-31 16:26:49 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/services/switch/toggle to 192.168.0.137 (auth: True)
2020-10-31 16:26:49 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=switch, service=toggle, service_data=entity_id=switch.kuled_5>
2020-10-31 16:26:49 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=mqtt, service=publish, service_data=topic=cmnd/tasmota_D9A6D4/POWER, qos=0, retain=False, payload=ON>
2020-10-31 16:26:49 DEBUG (SyncWorker_46) [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m79), 'b'cmnd/tasmota_D9A6D4/POWER'', ... (2 bytes)
2020-10-31 16:26:49 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_D9A6D4/POWER: 'ON', mid: 79
2020-10-31 16:26:49 DEBUG (Thread-5) [paho.mqtt.client] Received PUBLISH (d0, q0, r0, m0), 'tele/tasmota_D9A6D4/STATE', ... (286 bytes)
2020-10-31 16:26:49 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_D9A6D4/STATE: b'{"Time":"2020-10-31T22:26:49","Uptime":"1T02:13:04","UptimeSec":94384,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"cc5g","BSSId":"74:DA:88:BC:64:89","Channel":10,"RSSI":100,"Signal":-35,"LinkCount":1,"Downtime":"0T00:07:56"}}'
2020-10-31 16:26:49 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=switch.kuled_5, old_state=<state switch.kuled_5=off; friendly_name=Studio Right Wall Lights @ 2020-10-31T16:20:26.753651-05:00>, new_state=<state switch.kuled_5=on; friendly_name=Studio Right Wall Lights @ 2020-10-31T16:26:49.642749-05:00>>
2020-10-31 16:26:49 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.2941545920] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=switch.kuled_5, old_state=<state switch.kuled_5=off; friendly_name=Studio Right Wall Lights @ 2020-10-31T16:20:26.753651-05:00>, new_state=<state switch.kuled_5=on; friendly_name=Studio Right Wall Lights @ 2020-10-31T16:26:49.642749-05:00>>}
2020-10-31 16:26:49 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.2888724192] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=switch.kuled_5, old_state=<state switch.kuled_5=off; friendly_name=Studio Right Wall Lights @ 2020-10-31T16:20:26.753651-05:00>, new_state=<state switch.kuled_5=on; friendly_name=Studio Right Wall Lights @ 2020-10-31T16:26:49.642749-05:00>>}
2020-10-31 16:26:50 DEBUG (zeroconf-Engine-264) [zeroconf] Received from '192.168.0.137':5353 (socket 10): <DNSIncoming:{id=0, flags=0, n_q=1, n_ans=0, n_auth=0, n_add=0, questions=[question[a,in,homeassistant.local.]], answers=[]}> (37 bytes) as [b'\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\rhomeassistant\x05local\x00\x00\x01\x00\x01']
2020-10-31 16:26:50 DEBUG (zeroconf-Engine-264) [zeroconf] Received from '192.168.0.199':5353 (socket 10): <DNSIncoming:{id=0, flags=33792, n_q=0, n_ans=1, n_auth=0, n_add=0, questions=[], answers=[record[a,in-unique,homeassistant.local.]=120/119,192.168.0.199]}> (47 bytes) as [b'\x00\x00\x84\x00\x00\x00\x00\x01\x00\x00\x00\x00\rhomeassistant\x05local\x00\x00\x01\x80\x01\x00\x00\x00x\x00\x04\xc0\xa8\x00\xc7']
2020-10-31 16:26:50 DEBUG (zeroconf-Engine-264) [zeroconf] Received from '192.168.0.137':5353 (socket 10): <DNSIncoming:{id=0, flags=0, n_q=1, n_ans=0, n_auth=0, n_add=0, questions=[question[quada,in,homeassistant.local.]], answers=[]}> (37 bytes) as [b'\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\rhomeassistant\x05local\x00\x00\x1c\x00\x01']
2020-10-31 16:26:50 DEBUG (zeroconf-Engine-264) [zeroconf] Received from '192.168.0.199':5353 (socket 10): <DNSIncoming:{id=0, flags=33792, n_q=0, n_ans=1, n_auth=0, n_add=0, questions=[], answers=[record[quada,in-unique,homeassistant.local.]=120/119,fe80::821d:1c85:6794:5429]}> (59 bytes) as [b'\x00\x00\x84\x00\x00\x00\x00\x01\x00\x00\x00\x00\rhomeassistant\x05local\x00\x00\x1c\x80\x01\x00\x00\x00x\x00\x10\xfe\x80\x00\x00\x00\x00\x00\x00\x82\x1d\x1c\x85g\x94T)']
2020-10-31 16:26:50 DEBUG (zeroconf-Engine-264) [zeroconf] Received from '172.30.32.1':5353 (socket 10): <DNSIncoming:{id=0, flags=0, n_q=1, n_ans=0, n_auth=0, n_add=0, questions=[question[a,in,homeassistant.local.]], answers=[]}> (37 bytes) as [b'\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\rhomeassistant\x05local\x00\x00\x01\x00\x01']
2020-10-31 16:26:50 DEBUG (zeroconf-Engine-264) [zeroconf] Received from '172.30.32.1':5353 (socket 10): <DNSIncoming:{id=0, flags=0, n_q=1, n_ans=0, n_auth=0, n_add=0, questions=[question[quada,in,homeassistant.local.]], answers=[]}> (37 bytes) as [b'\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\rhomeassistant\x05local\x00\x00\x1c\x00\x01']
2020-10-31 16:26:50 DEBUG (Thread-5) [paho.mqtt.client] Received PUBLISH (d0, q0, r0, m0), 'tele/tasmota_D9A6D4/STATE', ... (286 bytes)
2020-10-31 16:26:50 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_D9A6D4/STATE: b'{"Time":"2020-10-31T22:26:50","Uptime":"1T02:13:05","UptimeSec":94385,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"cc5g","BSSId":"74:DA:88:BC:64:89","Channel":10,"RSSI":100,"Signal":-34,"LinkCount":1,"Downtime":"0T00:07:56"}}'
2020-10-31 16:26:51 DEBUG (zeroconf-Engine-264) [zeroconf] Received from '192.168.0.1':36621 (socket 10): <DNSIncoming:{id=18077, flags=0, n_q=1, n_ans=0, n_auth=0, n_add=0, questions=[question[ptr,in,192.168.0.105.in-addr.arpa.]], answers=[]}> (44 bytes) as [b'F\x9d\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03192\x03168\x010\x03105\x07in-addr\x04arpa\x00\x00\x0c\x00\x01']
2020-10-31 16:26:51 DEBUG (zeroconf-Engine-264) [zeroconf] Ignoring duplicate message received from '172.30.32.1':5353 (socket 10) (44 bytes) as [b'F\x9d\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03192\x03168\x010\x03105\x07in-addr\x04arpa\x00\x00\x0c\x00\x01']
2020-10-31 16:26:51 DEBUG (zeroconf-Engine-264) [zeroconf] Received from '192.168.0.1':44947 (socket 10): <DNSIncoming:{id=18078, flags=0, n_q=1, n_ans=0, n_auth=0, n_add=0, questions=[question[ptr,in,192.168.0.105.in-addr.arpa.]], answers=[]}> (44 bytes) as [b'F\x9e\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03192\x03168\x010\x03105\x07in-addr\x04arpa\x00\x00\x0c\x00\x01']
2020-10-31 16:26:51 DEBUG (zeroconf-Engine-264) [zeroconf] Ignoring duplicate message received from '172.30.32.1':5353 (socket 10) (44 bytes) as [b'F\x9e\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03192\x03168\x010\x03105\x07in-addr\x04arpa\x00\x00\x0c\x00\x01']
2020-10-31 16:26:51 DEBUG (zeroconf-Engine-264) [zeroconf] Received from '192.168.0.1':58379 (socket 10): <DNSIncoming:{id=18079, flags=0, n_q=1, n_ans=0, n_auth=0, n_add=0, questions=[question[ptr,in,192.168.0.153.in-addr.arpa.]], answers=[]}> (44 bytes) as [b'F\x9f\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03192\x03168\x010\x03153\x07in-addr\x04arpa\x00\x00\x0c\x00\x01']
2020-10-31 16:26:51 DEBUG (zeroconf-Engine-264) [zeroconf] Ignoring duplicate message received from '172.30.32.1':5353 (socket 10) (44 bytes) as [b'F\x9f\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03192\x03168\x010\x03153\x07in-addr\x04arpa\x00\x00\x0c\x00\x01']
2020-10-31 16:26:51 DEBUG (zeroconf-Engine-264) [zeroconf] Received from '192.168.0.1':57979 (socket 10): <DNSIncoming:{id=18080, flags=0, n_q=1, n_ans=0, n_auth=0, n_add=0, questions=[question[ptr,in,192.168.0.153.in-addr.arpa.]], answers=[]}> (44 bytes) as [b'F\xa0\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03192\x03168\x010\x03153\x07in-addr\x04arpa\x00\x00\x0c\x00\x01']
2020-10-31 16:26:51 DEBUG (zeroconf-Engine-264) [zeroconf] Ignoring duplicate message received from '172.30.32.1':5353 (socket 10) (44 bytes) as [b'F\xa0\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03192\x03168\x010\x03153\x07in-addr\x04arpa\x00\x00\x0c\x00\x01']
2020-10-31 16:26:51 DEBUG (zeroconf-Engine-264) [zeroconf] Received from '192.168.0.1':45832 (socket 10): <DNSIncoming:{id=18081, flags=0, n_q=1, n_ans=0, n_auth=0, n_add=0, questions=[question[ptr,in,192.168.0.242.in-addr.arpa.]], answers=[]}> (44 bytes) as [b'F\xa1\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03192\x03168\x010\x03242\x07in-addr\x04arpa\x00\x00\x0c\x00\x01']
2020-10-31 16:26:51 DEBUG (zeroconf-Engine-264) [zeroconf] Ignoring duplicate message received from '172.30.32.1':5353 (socket 10) (44 bytes) as [b'F\xa1\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03192\x03168\x010\x03242\x07in-addr\x04arpa\x00\x00\x0c\x00\x01']
2020-10-31 16:26:51 DEBUG (zeroconf-Engine-264) [zeroconf] Received from '192.168.0.1':32978 (socket 10): <DNSIncoming:{id=18082, flags=0, n_q=1, n_ans=0, n_auth=0, n_add=0, questions=[question[ptr,in,192.168.0.242.in-addr.arpa.]], answers=[]}> (44 bytes) as [b'F\xa2\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03192\x03168\x010\x03242\x07in-addr\x04arpa\x00\x00\x0c\x00\x01']
2020-10-31 16:26:51 DEBUG (zeroconf-Engine-264) [zeroconf] Ignoring duplicate message received from '172.30.32.1':5353 (socket 10) (44 bytes) as [b'F\xa2\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03192\x03168\x010\x03242\x07in-addr\x04arpa\x00\x00\x0c\x00\x01']
2020-10-31 16:26:53 DEBUG (MainThread) [homeassistant.components.ssdp] Scanning
2020-10-31 16:26:57 DEBUG (MainThread) [homeassistant.components.http.auth] Authenticated 192.168.0.137 for /api/services/switch/toggle using bearer token
2020-10-31 16:26:57 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/services/switch/toggle to 192.168.0.137 (auth: True)
2020-10-31 16:26:57 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=switch, service=toggle, service_data=entity_id=switch.kuled_5>
2020-10-31 16:26:57 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=mqtt, service=publish, service_data=topic=cmnd/tasmota_D9A6D4/POWER, qos=0, retain=False, payload=OFF>
2020-10-31 16:26:57 DEBUG (SyncWorker_2) [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m80), 'b'cmnd/tasmota_D9A6D4/POWER'', ... (3 bytes)
2020-10-31 16:26:57 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_D9A6D4/POWER: 'OFF', mid: 80
2020-10-31 16:26:57 DEBUG (Thread-5) [paho.mqtt.client] Received PUBLISH (d0, q0, r0, m0), 'tele/tasmota_D9A6D4/STATE', ... (287 bytes)
2020-10-31 16:26:57 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_D9A6D4/STATE: b'{"Time":"2020-10-31T22:26:56","Uptime":"1T02:13:11","UptimeSec":94391,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"OFF","Wifi":{"AP":1,"SSId":"cc5g","BSSId":"74:DA:88:BC:64:89","Channel":10,"RSSI":100,"Signal":-33,"LinkCount":1,"Downtime":"0T00:07:56"}}'
2020-10-31 16:26:57 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=switch.kuled_5, old_state=<state switch.kuled_5=on; friendly_name=Studio Right Wall Lights @ 2020-10-31T16:26:49.642749-05:00>, new_state=<state switch.kuled_5=off; friendly_name=Studio Right Wall Lights @ 2020-10-31T16:26:57.226054-05:00>>
2020-10-31 16:26:57 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.2941545920] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=switch.kuled_5, old_state=<state switch.kuled_5=on; friendly_name=Studio Right Wall Lights @ 2020-10-31T16:26:49.642749-05:00>, new_state=<state switch.kuled_5=off; friendly_name=Studio Right Wall Lights @ 2020-10-31T16:26:57.226054-05:00>>}
2020-10-31 16:26:57 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.2888724192] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=switch.kuled_5, old_state=<state switch.kuled_5=on; friendly_name=Studio Right Wall Lights @ 2020-10-31T16:26:49.642749-05:00>, new_state=<state switch.kuled_5=off; friendly_name=Studio Right Wall Lights @ 2020-10-31T16:26:57.226054-05:00>>}```