1
0
Fork 0
mirror of https://github.com/Andre0512/hon.git synced 2025-05-28 13:44:10 -04:00

Add light entity for lights

This commit is contained in:
Andre Basche 2023-06-30 19:36:36 +02:00
parent 1d83162f7d
commit 97637ef244
5 changed files with 113 additions and 17 deletions
custom_components/hon

View file

@ -44,8 +44,9 @@ async def async_setup_entry(hass, entry: ConfigEntry, async_add_entities) -> Non
for device in hass.data[DOMAIN][entry.unique_id].appliances:
for description in FANS.get(device.appliance_type, []):
if isinstance(description, HonFanEntityDescription):
if description.key not in device.available_settings or device.get(
description.key.split(".")[-1] is None
if (
description.key not in device.available_settings
or device.get(description.key.split(".")[-1]) is None
):
continue
entity = HonFanEntity(hass, entry, device, description)