Use platform enum consistently in fibaro integration (#69035)
This commit is contained in:
parent
853b57e7cf
commit
e894ffecd8
9 changed files with 80 additions and 56 deletions
|
@ -16,6 +16,7 @@ from homeassistant.components.light import (
|
|||
color_supported,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import Platform
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
|
@ -53,7 +54,9 @@ async def async_setup_entry(
|
|||
async_add_entities(
|
||||
[
|
||||
FibaroLight(device)
|
||||
for device in hass.data[DOMAIN][entry.entry_id][FIBARO_DEVICES]["light"]
|
||||
for device in hass.data[DOMAIN][entry.entry_id][FIBARO_DEVICES][
|
||||
Platform.LIGHT
|
||||
]
|
||||
],
|
||||
True,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue