Add Switcher button platform (#81245)
This commit is contained in:
parent
ec823582eb
commit
f97ac9fdcd
8 changed files with 330 additions and 7 deletions
|
@ -6,9 +6,11 @@ from collections.abc import Callable
|
|||
import logging
|
||||
from typing import Any
|
||||
|
||||
from aioswitcher.api.remotes import SwitcherBreezeRemoteManager
|
||||
from aioswitcher.bridge import SwitcherBase, SwitcherBridge
|
||||
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers import singleton
|
||||
|
||||
from .const import DATA_BRIDGE, DISCOVERY_TIME_SEC, DOMAIN
|
||||
|
||||
|
@ -53,3 +55,9 @@ async def async_discover_devices() -> dict[str, SwitcherBase]:
|
|||
|
||||
_LOGGER.debug("Finished discovery, discovered devices: %s", len(discovered_devices))
|
||||
return discovered_devices
|
||||
|
||||
|
||||
@singleton.singleton("switcher_breeze_remote_manager")
|
||||
def get_breeze_remote_manager(hass: HomeAssistant) -> SwitcherBreezeRemoteManager:
|
||||
"""Get Switcher Breeze remote manager."""
|
||||
return SwitcherBreezeRemoteManager()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue