Add initial support for H100 and T315 (#776)

Adds initial support for H100 and its alarmmodule.

Also implements the following modules for T315:
* reportmodule (reporting interval)
* battery
* humidity
* temperature
This commit is contained in:
Teemu R
2024-02-22 23:09:38 +01:00
committed by GitHub
parent 951d41a628
commit bc65f96f85
14 changed files with 292 additions and 21 deletions

View File

@@ -63,9 +63,12 @@ class SmartDevice(Device):
)
for child_info in children
}
# TODO: if all are sockets, then we are a strip, and otherwise a hub?
# doesn't work for the walldimmer with fancontrol...
self._device_type = DeviceType.Strip
# TODO: This may not be the best approach, but it allows distinguishing
# between power strips and hubs for the time being.
if all(child.is_plug for child in self._children.values()):
self._device_type = DeviceType.Strip
else:
self._device_type = DeviceType.Hub
@property
def children(self) -> Sequence["SmartDevice"]:
@@ -518,7 +521,7 @@ class SmartDevice(Device):
if self.children:
if "SMART.TAPOHUB" in self.sys_info["type"]:
pass # TODO: placeholder for future hub PR
self._device_type = DeviceType.Hub
else:
self._device_type = DeviceType.Strip
elif "light_strip" in self._components: