Skip to content
Draft
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c07c896
add 3r project py
jintj Aug 30, 2024
138ae97
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 30, 2024
ef0efaa
update
jintj Sep 20, 2025
0148d86
update
jintj Sep 20, 2025
20f777e
update
jintj Sep 20, 2025
0e87d69
Apply pre-commit auto fixes
pre-commit-ci[bot] Sep 20, 2025
126ecd8
update button tes
jintj Sep 24, 2025
36eee8f
Apply pre-commit auto fixes
pre-commit-ci[bot] Sep 24, 2025
2cc011f
update
jintj Sep 24, 2025
b4cdbf6
Merge branch 'master' of https://github.com/3reality-support/zha-devi…
jintj Sep 24, 2025
89e80cb
Apply pre-commit auto fixes
pre-commit-ci[bot] Sep 24, 2025
115e9e4
Update test_third_button.py
3reality-support Sep 24, 2025
b484bc7
Apply pre-commit auto fixes
pre-commit-ci[bot] Sep 24, 2025
c798a96
Update test_third_button.py
3reality-support Sep 25, 2025
88c9847
Apply pre-commit auto fixes
pre-commit-ci[bot] Sep 25, 2025
4f74b2e
Update test_third_button.py
3reality-support Sep 25, 2025
e25a838
Apply pre-commit auto fixes
pre-commit-ci[bot] Sep 25, 2025
e275a43
Update test_third_button.py
3reality-support Sep 25, 2025
c5b8f9a
Apply pre-commit auto fixes
pre-commit-ci[bot] Sep 25, 2025
86ac6c4
Update test_third_button.py
3reality-support Sep 25, 2025
44748cb
Apply pre-commit auto fixes
pre-commit-ci[bot] Sep 25, 2025
4a8b815
Update test_third_button.py
3reality-support Sep 25, 2025
58b6ed2
Update test_third_button.py
3reality-support Sep 25, 2025
b95f82c
Apply pre-commit auto fixes
pre-commit-ci[bot] Sep 25, 2025
9f0034f
Update test_third_button.py
3reality-support Sep 25, 2025
cfd1145
Apply pre-commit auto fixes
pre-commit-ci[bot] Sep 25, 2025
63a1b15
Update test_third_button.py
3reality-support Sep 25, 2025
60447b7
update
jintj Sep 25, 2025
26a4356
Merge branch 'dev' into master
3reality-support Sep 25, 2025
8c1b51b
update
jintj Oct 9, 2025
e5190e0
update
jintj Oct 9, 2025
b1755ae
update
jintj Oct 9, 2025
ea9535e
Apply pre-commit auto fixes
pre-commit-ci[bot] Oct 9, 2025
e5832c3
Update curtain_gen1.py
3reality-support Oct 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions zhaquirks/thirdreality/curtain_gen1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
"""Third Reality curtain devices."""

from typing import Final

from zigpy.quirks import CustomCluster
from zigpy.quirks.v2 import QuirkBuilder
import zigpy.types as t
from zigpy.zcl.foundation import BaseAttributeDefs, ZCLAttributeDef


class ThirdRealityCurtainCluster(CustomCluster):
"""Third Reality's curtain private cluster."""

cluster_id = 0xFFF1

class AttributeDefs(BaseAttributeDefs):
"""Define the attributes of a private cluster."""

enable_disable_pir_remote: Final = ZCLAttributeDef(
id=0x0000,
type=t.uint8_t,
is_manufacturer_specific=True,
)

allow_bind: Final = ZCLAttributeDef(
id=0x0020,
type=t.uint8_t,
is_manufacturer_specific=True,
)


(
QuirkBuilder("Third Reality, Inc", "3RSB015BZ")
.replaces(ThirdRealityCurtainCluster)
.switch(
attribute_name=ThirdRealityCurtainCluster.AttributeDefs.enable_disable_pir_remote.name,
cluster_id=ThirdRealityCurtainCluster.cluster_id,
force_inverted=True,
translation_key="enable_pir_mode",
fallback_name="Enable PIR remote",
)
.write_attr_button(
attribute_name=ThirdRealityCurtainCluster.AttributeDefs.allow_bind.name,
attribute_value=0x01,
cluster_id=ThirdRealityCurtainCluster.cluster_id,
translation_key="allow_bind",
fallback_name="Allow bind",
)
Comment on lines +42 to +48
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "Allow bind" do exactly? Is this related to cluster binding or to curtains being bound?
Does the device reset the value from 1 to 0 itself after this button is pressed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image For example, sending a bind request to the button, opening the bind, the curtain can send a request to establish contact, triggering an allow bind once, which can last for three minutes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After writing 1, wait for 3 minutes until the end, and this value will become 0

.add_to_registry()
)
Loading