Add support for Pico and Shade remotes to Lutron Caseta (#45315)
This commit is contained in:
parent
b533b91b10
commit
25f411ef6e
16 changed files with 982 additions and 29 deletions
|
@ -13,7 +13,8 @@ from homeassistant.components.fan import (
|
|||
FanEntity,
|
||||
)
|
||||
|
||||
from . import DOMAIN as CASETA_DOMAIN, LutronCasetaDevice
|
||||
from . import LutronCasetaDevice
|
||||
from .const import BRIDGE_DEVICE, BRIDGE_LEAP, DOMAIN as CASETA_DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -44,11 +45,13 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||
"""
|
||||
|
||||
entities = []
|
||||
bridge = hass.data[CASETA_DOMAIN][config_entry.entry_id]
|
||||
data = hass.data[CASETA_DOMAIN][config_entry.entry_id]
|
||||
bridge = data[BRIDGE_LEAP]
|
||||
bridge_device = data[BRIDGE_DEVICE]
|
||||
fan_devices = bridge.get_devices_by_domain(DOMAIN)
|
||||
|
||||
for fan_device in fan_devices:
|
||||
entity = LutronCasetaFan(fan_device, bridge)
|
||||
entity = LutronCasetaFan(fan_device, bridge, bridge_device)
|
||||
entities.append(entity)
|
||||
|
||||
async_add_entities(entities, True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue