diff --git a/custom_components/hubitat/light.py b/custom_components/hubitat/light.py index b35f526..4f33b1b 100644 --- a/custom_components/hubitat/light.py +++ b/custom_components/hubitat/light.py @@ -35,6 +35,7 @@ from .cover import is_cover from .device import HubitatEntity from .entities import create_and_add_entities +from .fan import is_fan from .types import EntityAdder _LOGGER = getLogger(__name__) @@ -166,7 +167,12 @@ def is_light(device: Device) -> bool: return True if CAP_SWITCH in device.capabilities and MATCH_LIGHT.match(device.name): return True - if CAP_SWITCH_LEVEL in device.capabilities and not is_cover(device): + if ( + CAP_SWITCH_LEVEL in device.capabilities + and MATCH_LIGHT.match(device.name) + and not is_cover(device) + and not is_fan(device) + ): return True return False