-
Notifications
You must be signed in to change notification settings - Fork 892
Add Third Reality curtain gen2 settings #4381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
3reality-support
wants to merge
11
commits into
zigpy:dev
Choose a base branch
from
3reality-support:curtain_gen2
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8ccb1e1
update
jintj 3603f5d
update
jintj 844f1c7
Apply pre-commit auto fixes
pre-commit-ci[bot] bb3642e
update
jintj d8f165a
Merge branch 'curtain_gen2' of https://github.com/3reality-support/zh…
jintj bdfee0c
Apply pre-commit auto fixes
pre-commit-ci[bot] 2481437
Rename Blind_Gen2.py to curtain_gen2.py
3reality-support c5e3dc6
Update zhaquirks/thirdreality/curtain_gen2.py
3reality-support 1514968
Update zhaquirks/thirdreality/curtain_gen2.py
3reality-support b57ee87
Update zhaquirks/thirdreality/curtain_gen2.py
3reality-support 8f90720
Update zhaquirks/thirdreality/curtain_gen2.py
3reality-support File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| """Third Reality Blind Gen2 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 THIRD_REALITY_Blind_Gen2_CLUSTER(CustomCluster): | ||
| """Third Reality's Blind Gen2 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, | ||
| ) | ||
|
|
||
| compensation_speed: Final = ZCLAttributeDef( | ||
| id=0x0001, | ||
| type=t.int8s, | ||
| is_manufacturer_specific=True, | ||
| ) | ||
|
|
||
| limit_position: Final = ZCLAttributeDef( | ||
| id=0x0002, | ||
| type=t.uint16_t, | ||
| is_manufacturer_specific=True, | ||
| ) | ||
|
|
||
|
|
||
| ( | ||
| QuirkBuilder("Third Reality, Inc", "3RSB02015Z") | ||
| .replaces(THIRD_REALITY_Blind_Gen2_CLUSTER, endpoint_id=1) | ||
| .switch( | ||
| attribute_name=THIRD_REALITY_Blind_Gen2_CLUSTER.AttributeDefs.enable_disable_pir_remote.name, | ||
| cluster_id=THIRD_REALITY_Blind_Gen2_CLUSTER.cluster_id, | ||
| force_inverted=True, | ||
| translation_key="enable_pir_mode", | ||
| fallback_name="Enable PIR remote", | ||
| ) | ||
| .number( | ||
| attribute_name=THIRD_REALITY_Blind_Gen2_CLUSTER.AttributeDefs.compensation_speed.name, | ||
| cluster_id=THIRD_REALITY_Blind_Gen2_CLUSTER.cluster_id, | ||
| endpoint_id=1, | ||
| min_value=-100, | ||
| max_value=100, | ||
| step=1, | ||
| mode="box", | ||
| translation_key="compensation_speed", | ||
| fallback_name="Compensation speed", | ||
| ) | ||
| .number( | ||
| attribute_name=THIRD_REALITY_Blind_Gen2_CLUSTER.AttributeDefs.limit_position.name, | ||
| cluster_id=THIRD_REALITY_Blind_Gen2_CLUSTER.cluster_id, | ||
| endpoint_id=1, | ||
| min_value=0, | ||
| max_value=3800, | ||
| step=1, | ||
| translation_key="limit_position", | ||
| fallback_name="Limit position", | ||
| ) | ||
| .add_to_registry() | ||
| ) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.