mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 10:59:40 +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:
@@ -79,7 +79,7 @@ def callback(func: Callable[..., None]) -> Callable[..., None]:
|
||||
|
||||
def is_callback(func: Callable[..., Any]) -> bool:
|
||||
"""Check if function is safe to be called in the event loop."""
|
||||
return '_hass_callback' in func.__dict__
|
||||
return '_hass_callback' in getattr(func, '__dict__', {})
|
||||
|
||||
|
||||
@callback
|
||||
|
||||
Reference in New Issue
Block a user