* Fix transition handling for tplink light
* Apply suggestions from code review
* Test that all transitions are passed correctly
* Fix linting
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
- These devices sometimes do not respond on the first try
or may be subject to transient broadcast failures, or
overloads. We now try discovery periodically once the
integration has been loaded.
- We used to try this 4x at startup, but that solution
seemed to aggressive as we want to be sure we pickup
the devices after startup as well since the network
will likely be more calm after startup.
* Convert persistent notification tests to async
* Create/dismiss persistent notifications in exposed functions, not service calls
* Fix notify persistent_notification
* Remove setting up persistent_notification
* Drop more setups
* Empty methods
* Undeprecate sync methods because too big task
* Fix setup clearing notifications
* Fix a bunch of tests
* Fix more tests
* Uno mas
* Test persistent notification events
* Clean up stale comment
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
- These sensors wobble quite a bit and the precision did
not have sensible limits which generated a massive amount
of data in the database which was not very useful
* Explictly close the TPLink SmartDevice protocol on unload
- There is a destructor that will eventually do this when
the object gets gc. Its better to explictly do it at
unload.
* fix coro mock
* Unused pylint suppression cleanups
* Remove outdated pylint bug references
* Add flake8-noqa config and note to run it every now and then
* Add codes to noqa's
* Unused noqa cleanups
* Adds self to codeowners for tplink
* Adds retry to update to prevent missing devices
* Runs through isort and corrects async commit
* Runs through black
* Runs through pre-checks
* Corrects and matches var names
* Re-runs through black
* Corrects var name
* Removes the retry loop and in favor of async add
* Cleanup imports
* Removes no longer valid test
* Removes is_ready and only log retry once
* Corrects switch logging vars
* Adds list of entities to add_entities
* Consumes exception for attempt_update
* Consumes specific exception
* Removes unnecessary update
* Reducing back to 2 seconds
* Removes useless return
* Call get_sysinfo for all at once
* Formated black
* Adds missing docstirng
* Corrects docstring
* Update homeassistant/components/tplink/light.py
Co-authored-by: Anders Melchiorsen <amelchio@nogoto.net>
* Corrects sysinfo call
* Adds default for host vars
* Adds log when device responds again
* Revert host alias default
* Removes unncessary host var
* Removes host var
* Get device details from sysinfo
* Use host and alias for log msg
* Gets hosts from smartbulb
* Changes retry logging to debug
* Attempts coverage add
* Removes unused import
* Updates tests for new retry
* Runs through isort
* Removes unneeded try
* Prevents static entries from failing integration
* Format black
* Forces an update after turn on off
* Remove common test
* Revert update after turn_on off
* Adds patch for sleep_time 0
* Returns False when update fails
Co-authored-by: Anders Melchiorsen <amelchio@nogoto.net>
* HS220 dimmers are handled as lights with a limited feature set
* Dimmers look up has has_emeter every call so this is cached as well now
to resovle the performance issue.
* Speed up TP-Link lights
* Color temp kan be None
* hs as int, force color temp=0
* Fix color temp?
* Additional tplink cleanups to reduce api calls
* Update test to return state, remove Throttle
* Fix state restore on off/on
* Fix lights without hue/sat
Co-authored-by: J. Nick Koston <nick@koston.org>