Add ColorModule for smart devices (#840)

Adds support L530 hw_version 1.0
This commit is contained in:
Steven B
2024-04-20 16:18:35 +01:00
committed by GitHub
parent 4573260ac8
commit aeb2c923c6
9 changed files with 160 additions and 57 deletions

View File

@@ -93,3 +93,12 @@ class SmartModule(Module):
def supported_version(self) -> int:
"""Return version supported by the device."""
return self._device._components[self.REQUIRED_COMPONENT]
async def _check_supported(self) -> bool:
"""Additional check to see if the module is supported by the device.
Used for parents who report components on the parent that are only available
on the child or for modules where the device has a pointless component like
color_temp_range but only supports one value.
"""
return True