Add support for contact sensor (T110) (#877)

Initial support for T110 contact sensor & T110 fixture by courtesy of @ngaertner.
This commit is contained in:
Teemu R
2024-05-07 20:58:18 +02:00
committed by GitHub
parent 7f98acd477
commit 353e84438c
10 changed files with 621 additions and 8 deletions

View File

@@ -210,7 +210,10 @@ class SmartDevice(Bulb, Fan, Device):
skip_parent_only_modules and mod in WALL_SWITCH_PARENT_ONLY_MODULES
) or mod.__name__ in child_modules_to_skip:
continue
if mod.REQUIRED_COMPONENT in self._components:
if (
mod.REQUIRED_COMPONENT in self._components
or self.sys_info.get(mod.REQUIRED_KEY_ON_PARENT) is not None
):
_LOGGER.debug(
"Found required %s, adding %s to modules.",
mod.REQUIRED_COMPONENT,