Skip to content

Commit

Permalink
Add auto configure locks
Browse files Browse the repository at this point in the history
  • Loading branch information
xZetsubou committed May 12, 2024
1 parent f7fcf02 commit ca2da10
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions custom_components/localtuya/core/ha_entities/locks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"""
This a file contains available tuya data
https://developer.tuya.com/en/docs/iot/standarddescription?id=K9i5ql6waswzq
Credits: official HA Tuya integration.
Modified by: xZetsubou
"""

from .base import (
DPCode,
LocalTuyaEntity,
)


def localtuya_lock():
"""Define localtuya lock configs"""
data = {}
return data


LOCKS: dict[str, tuple[LocalTuyaEntity, ...]] = {
# Locks
"ms": (
LocalTuyaEntity(
id=(DPCode.REMOTE_UNLOCK_SWITCH, DPCode.SWITCH),
jammed_dp=DPCode.HIJACK,
lock_state_dp=(DPCode.OPEN_CLOSE, DPCode.CLOSED_OPENED),
custom_configs=localtuya_lock(),
),
),
}

LOCKS["jtmspro"] = LOCKS["ms"]
LOCKS["jtmsbh"] = LOCKS["ms"]

0 comments on commit ca2da10

Please sign in to comment.