mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Cleanup ZHA initialization for TS011F child_lock (#83478)
This commit is contained in:
parent
8ed6fcd58e
commit
fccf7fe1ca
@ -348,6 +348,7 @@ class OnOffChannel(ZigbeeChannel):
|
|||||||
self._off_listener = None
|
self._off_listener = None
|
||||||
|
|
||||||
if self.cluster.endpoint.model in (
|
if self.cluster.endpoint.model in (
|
||||||
|
"TS011F",
|
||||||
"TS0121",
|
"TS0121",
|
||||||
"TS0001",
|
"TS0001",
|
||||||
"TS0002",
|
"TS0002",
|
||||||
@ -359,13 +360,8 @@ class OnOffChannel(ZigbeeChannel):
|
|||||||
)
|
)
|
||||||
self.ZCL_INIT_ATTRS["backlight_mode"] = True
|
self.ZCL_INIT_ATTRS["backlight_mode"] = True
|
||||||
self.ZCL_INIT_ATTRS["power_on_state"] = True
|
self.ZCL_INIT_ATTRS["power_on_state"] = True
|
||||||
elif self.cluster.endpoint.model == "TS011F":
|
if self.cluster.endpoint.model == "TS011F":
|
||||||
self.ZCL_INIT_ATTRS = ( # pylint: disable=invalid-name
|
self.ZCL_INIT_ATTRS["child_lock"] = True
|
||||||
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
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def on_off(self) -> bool | None:
|
def on_off(self) -> bool | None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user