Cleanup ZHA initialization for TS011F child_lock (#83478)

This commit is contained in:
TheJulianJES 2022-12-07 16:53:08 +01:00 committed by Franck Nijhof
parent 141f37504d
commit 1631d10365
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -348,6 +348,7 @@ class OnOffChannel(ZigbeeChannel):
self._off_listener = None
if self.cluster.endpoint.model in (
"TS011F",
"TS0121",
"TS0001",
"TS0002",
@ -359,13 +360,8 @@ class OnOffChannel(ZigbeeChannel):
)
self.ZCL_INIT_ATTRS["backlight_mode"] = True
self.ZCL_INIT_ATTRS["power_on_state"] = True
elif self.cluster.endpoint.model == "TS011F":
self.ZCL_INIT_ATTRS = ( # pylint: disable=invalid-name
self.ZCL_INIT_ATTRS.copy()
)
self.ZCL_INIT_ATTRS["backlight_mode"] = True
self.ZCL_INIT_ATTRS["child_lock"] = True
self.ZCL_INIT_ATTRS["power_on_state"] = True
if self.cluster.endpoint.model == "TS011F":
self.ZCL_INIT_ATTRS["child_lock"] = True
@property
def on_off(self) -> bool | None: