Skip to content

Commit

Permalink
Fix Nimly smart lock mains-powered capability (#3457)
Browse files Browse the repository at this point in the history
  • Loading branch information
uvNikita authored Oct 26, 2024
1 parent 3348316 commit 263e68c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zhaquirks/nimly/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Nimly module."""

NIMLY = "Onesti Products AS"
36 changes: 36 additions & 0 deletions zhaquirks/nimly/lock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""Device handler for Nimly Smart Locks."""

from zigpy.quirks.v2 import QuirkBuilder
from zigpy.zdo.types import NodeDescriptor

from zhaquirks.nimly import NIMLY

# clears the mains powered mac capability flag
NIMLY_LOCK_NODE_DESCRIPTOR = NodeDescriptor(
logical_type=2,
complex_descriptor_available=0,
user_descriptor_available=0,
reserved=0,
aps_flags=0,
frequency_band=8,
manufacturer_code=4660,
maximum_buffer_size=108,
maximum_incoming_transfer_size=127,
server_mask=11264,
maximum_outgoing_transfer_size=127,
descriptor_capability_field=0,
mac_capability_flags=NodeDescriptor.MACCapabilityFlags.AllocateAddress
| NodeDescriptor.MACCapabilityFlags.RxOnWhenIdle,
)


(
QuirkBuilder(NIMLY, "NimlyPRO")
.also_applies_to(NIMLY, "NimlyCode")
.also_applies_to(NIMLY, "NimlyTouch")
.also_applies_to(NIMLY, "NimlyIn")
.also_applies_to(NIMLY, "EasyFingerTouch")
.also_applies_to(NIMLY, "EasyCodeTouch")
.node_descriptor(NIMLY_LOCK_NODE_DESCRIPTOR)
.add_to_registry()
)

0 comments on commit 263e68c

Please sign in to comment.