Refactor Hue: phue -> aiohue (#13043)
* phue -> aiohue * Clean up * Fix config * Address comments * Typo * Fix rebase error * Mark light as unavailable when bridge is disconnected * Tests * Make Throttle work with double delay and async * Rework update logic * Don't resolve host to IP * Clarify comment * No longer do unnecessary updates * Add more doc * Another comment update * Wrap up tests * Lint * Fix tests * PyLint does not like mix 'n match async and coroutine * Lint * Update aiohue to 1.2 * Lint * Fix await MagicMock
This commit is contained in:
parent
d78e75db66
commit
5a9013cda5
20 changed files with 1289 additions and 1485 deletions
|
@ -291,3 +291,11 @@ async def test_throttle_async():
|
|||
|
||||
assert (await test_method()) is True
|
||||
assert (await test_method()) is None
|
||||
|
||||
@util.Throttle(timedelta(seconds=2), timedelta(seconds=0.1))
|
||||
async def test_method2():
|
||||
"""Only first call should return a value."""
|
||||
return True
|
||||
|
||||
assert (await test_method2()) is True
|
||||
assert (await test_method2()) is None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue