core/homeassistant/components/tplink
Teemu R 3bc45eacfc
Fix tplink doing I/O in event loop and optimize (#54570)
* Optimize tplink i/o

* Cache has_emeter reduceing the number of i/o requests on hs300 by 5
* Use the state from the sysinfo dict for non-strips reducing required requests by one

* Remove I/O from __init__, read has_emeter from sysinfo

* Cleanup __init__ to avoid I/O
* Re-use the sysinfo response for has_emeter
* Use async_add_executor_job() to execute the synchronous I/O ops.

* use the device alias instead of host for coordinator, use executor for unavailable_devices

* Remove unnecessary self.hass assignment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-18 01:29:40 +02:00
..
translations [ci skip] Translation update 2021-08-02 03:40:04 +00:00
__init__.py Fix tplink doing I/O in event loop and optimize (#54570) 2021-08-18 01:29:40 +02:00
common.py
config_flow.py
const.py Do not block setup of TP-Link when device unreachable (#53770) 2021-08-01 14:58:55 -07:00
light.py
manifest.json
sensor.py Use state class total increasing for TPLink smart plugs (#54723) 2021-08-16 23:54:11 +02:00
strings.json
switch.py Fix TP-Link smart strip devices (#53799) 2021-08-02 09:47:54 -07:00