mirror of
https://github.com/home-assistant/core.git
synced 2025-11-07 01:50:18 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user