From 46749b1e7d6a797faf502523bb448bca885c3789 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 26 Mar 2024 17:54:36 +0900 Subject: [PATCH] Add support for YSG BS01 bluetooth lock Issue #1713 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + .../tuya_local/devices/ble_ysgbs01_lock.yaml | 141 ++++++++++++++++++ 3 files changed, 143 insertions(+) create mode 100644 custom_components/tuya_local/devices/ble_ysgbs01_lock.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 907bdb3b6c..2ba34b2519 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -532,3 +532,4 @@ Further device support has been made with the assistance of users. Please consid - [phid78](https://github.com/phid78) for assisting with support for Tediton K7 door locks. - [jwGeorge](https://github.com/jwGeorge) for contributing improvements to Madimack Elite V3 heatpumps. - [luis-guilherme](https://github.com/luis-guilherme) for contributing support for simple dual switches (eMylo dual RF/Wifi switches). +- [tiernan1979](https://github.com/tiernan1979) for contributing support for YSG BS01 bluetooth locks. diff --git a/DEVICES.md b/DEVICES.md index 95c939a7fd..ec8ee58821 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -702,6 +702,7 @@ port and password. - SGS01 plant sensor - Smart Ape solar garden light - TH05 temperature and humidity sensor +- YSG BS01 lock - Generic water timers (confirmed with Johgee, Diivoo and Royal Gardineer branded devices) ### Devices supported via IR hubs diff --git a/custom_components/tuya_local/devices/ble_ysgbs01_lock.yaml b/custom_components/tuya_local/devices/ble_ysgbs01_lock.yaml new file mode 100644 index 0000000000..f1f1f80b6c --- /dev/null +++ b/custom_components/tuya_local/devices/ble_ysgbs01_lock.yaml @@ -0,0 +1,141 @@ +name: Door lock +products: + - id: isk2p555 + name: YSG BS01 BLE lock +primary_entity: + entity: lock + dps: + - id: 1 + type: string + name: create_unlock_method + optional: true + - id: 2 + type: string + name: delete_unlock_method + optional: true + - id: 3 + type: string + name: modify_unlock_method + optional: true + - id: 6 + type: string + name: bluetooth_unlock + optional: true + - id: 12 + type: integer + name: unlock_fingerprint + optional: true + persist: false + - id: 13 + type: integer + name: unlock_password + optional: true + persist: false + - id: 14 + type: integer + name: unlock_dynamic_pwd + optional: true + persist: false + - id: 19 + type: integer + name: unlock_ble + optional: true + persist: false + - id: 47 + type: boolean + name: lock + optional: true + readonly: true + - id: 55 + type: integer + name: unlock_temp_pwd + optional: true + persist: false + - id: 62 + type: integer + name: unlock_app + optional: true + persist: false + - id: 63 + type: integer + name: unlock_voice + optional: true + persist: false +secondary_entities: + - entity: sensor + class: battery + category: diagnostic + dps: + - id: 8 + type: integer + name: sensor + unit: "%" + class: measurement + - entity: sensor + name: Alert + class: enum + category: diagnostic + dps: + - id: 21 + type: string + name: sensor + optional: true + persist: false + mapping: + - dps_val: null + value: ok + - dps_val: wrong_finger + value: wrong_finger + - dps_val: wrong_password + value: wrong_password + - dps_val: low_battery + value: low_battery + - entity: binary_sensor + class: battery + category: diagnostic + dps: + - id: 21 + type: string + name: sensor + mapping: + - dps_val: low_battery + value: true + - value: false + - entity: select + name: Language + icon: "mdi:translate" + category: config + dps: + - id: 28 + type: string + name: option + mapping: + - dps_val: chinese_simplified + value: 中文 + - dps_val: english + value: English + - entity: number + name: Beep volume + category: config + icon: "mdi:volume-high" + dps: + - id: 31 + type: string + name: value + unit: "%" + range: + min: 0 + max: 100 + mapping: + - dps_val: mute + step: 33 + value: 0 + - dps_val: low + step: 33 + value: 33 + - dps_val: normal + step: 33 + value: 66 + - dps_val: high + step: 33 + value: 100