From bf84f386e7ee6452f15a73a4606a2652c6ea3410 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 7 Jul 2024 19:19:07 +0900 Subject: [PATCH 001/169] config_flow: load yaml config in an executor Avoid blocking the event loop. Issue #2083 and others. --- custom_components/tuya_local/config_flow.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/custom_components/tuya_local/config_flow.py b/custom_components/tuya_local/config_flow.py index 66afbc68fe..3143048416 100644 --- a/custom_components/tuya_local/config_flow.py +++ b/custom_components/tuya_local/config_flow.py @@ -512,7 +512,10 @@ async def async_step_choose_entities(self, user_input=None): return self.async_create_entry( title=title, data={**self.data, **user_input} ) - config = get_config(self.data[CONF_TYPE]) + config = await self.hass.async_add_executor_job( + get_config, + self.data[CONF_TYPE], + ) schema = {vol.Required(CONF_NAME, default=config.name): str} return self.async_show_form( @@ -578,7 +581,10 @@ async def async_step_user(self, user_input=None): default=config.get(CONF_DEVICE_CID, ""), ): str, } - cfg = get_config(config[CONF_TYPE]) + cfg = await self.hass.async_add_executor_job( + get_config, + config[CONF_TYPE], + ) if cfg is None: return self.async_abort(reason="not_supported") From d4b09658dcef7397158504c3003fab407da19250 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 8 Jul 2024 18:15:17 +0900 Subject: [PATCH 002/169] Bump tinytuya to 1.15.0 --- custom_components/tuya_local/manifest.json | 2 +- requirements-dev.txt | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/tuya_local/manifest.json b/custom_components/tuya_local/manifest.json index a1b0b9d4dd..8d57c90174 100644 --- a/custom_components/tuya_local/manifest.json +++ b/custom_components/tuya_local/manifest.json @@ -11,7 +11,7 @@ "iot_class": "local_push", "issue_tracker": "https://github.com/make-all/tuya-local/issues", "requirements": [ - "tinytuya==1.14.0", + "tinytuya==1.15.0", "tuya-device-sharing-sdk>=0.1.9,<=0.2.99" ], "version": "2024.7.0" diff --git a/requirements-dev.txt b/requirements-dev.txt index 7bdb0ec8bc..49e62600a1 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,6 +5,6 @@ pytest pytest-asyncio pytest-cov ruff -tinytuya~=1.14.0 +tinytuya~=1.15.0 tuya-device-sharing-sdk>=0.1.9,<=0.2.99 yamllint diff --git a/requirements.txt b/requirements.txt index fea52b3281..7c73d6187a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -tinytuya~=1.14.0 +tinytuya~=1.15.0 tuya-device-sharing-sdk>=0.1.9,<=0.2.99 x From bbd0c6f8862c4e053f7965c24f7447eec8349696 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 8 Jul 2024 18:30:08 +0900 Subject: [PATCH 003/169] Docs for recent PRs PR #2018, #2032, #2070, #2082 --- ACKNOWLEDGEMENTS.md | 5 ++++- DEVICES.md | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index f093546004..a97ab9fbec 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -447,7 +447,7 @@ Further device support has been made with the assistance of users. Please consid - [convicte](https://github.com/convicte) for assisting with support for Inna 7 channel underfloor heating controllers. - [mrtn1988](https://github.com/mrtn1988) for assisting with support for QH-GD Elegant IR heaters. - [uandco](https://github.com/uandco) for assisting with support for Evotherm ETI pool heatpumps. -- [almirus](https://github.com/almirus) for contributing support for Neatsvor X500 vacuums, TH05-BLE temperature/humidity sensors, SGS01 soil moisture BLE sensors, Donguan curtain robots, LightStar track lights, Royal Clima Fresh heatpumps. +- [almirus](https://github.com/almirus) for contributing support for Neatsvor X500 vacuums, TH05-BLE temperature/humidity sensors, SGS01 and TCS024B soil moisture BLE sensors, Donguan curtain robots, LightStar track lights, Royal Clima Fresh heatpumps. - [kinkamez](https://github.com/kinkamez) for contributing support for Prosto PRC 2000 heaters. - [MarkPaxton](https://github.com/MarkPaxton) for contributing support for Hombli radiator controllers. - [mmib](https://github.com/mmib) for contributing support for Becasmart irrigation systems. @@ -586,3 +586,6 @@ Further device support has been made with the assistance of users. Please consid - [aravindjaimon](https://github.com/aravindjaimon) for contributing support for Atomberg Gorilla fan V2. - [krie](https://github.com/krie) for contributing support for Klarstein Iceblock air conditioner. - [lukegackle](https://github.com/lukegackle) for contributing support for Bauhn 5 way powerstrips. +- [ewandank](https://github.com/ewandank) for contributing support for Kogan LX-8 vacuum robots. +- [rac146](https://github.com/rac146) for contributing support for Zemismart ZM25R2 roller shades. +- [Nuwisam](https://github.com/Nuwisam) for contributing doc fixes. diff --git a/DEVICES.md b/DEVICES.md index 140e217894..fc04a265ca 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -572,6 +572,7 @@ of device. - Kabum Smart 700 vacuum cleaner (also sold as Liectroux XR500[T2] and maybe others) - Kabum Smart 700 vacuum cleaner 2023 model (not quite compatible with Liectroux XR500 T3, but similar revision) - Kogan LX10 vacuum cleaner with mop +- Kogan LX8 vacuum cleaner - Kyvol E30 vacuum cleaner - Lefant LS1 Pro vacuum cleaner - Lefant M213 vacuum cleaner (also works for Lefant M213S and APOSEN A550) @@ -748,6 +749,7 @@ port and password. - PT216/PT19DB-2 temperature and humidity sensor - SGS01 plant sensor - Smart Ape solar garden light +- TCS024B plant moisture sensor - TH05 temperature and humidity sensor - XCase NX-4964 lock box - YL01 water quality tester From e5c7915b46bb7752d024125d9eb1b7db53050fb3 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 8 Jul 2024 22:31:59 +0900 Subject: [PATCH 004/169] Add support for another Tongou QCB2 WB circuit breaker Issue #1934 --- ACKNOWLEDGEMENTS.md | 1 + .../devices/tongou_qcb2wb_breaker.yaml | 323 ++++++++++++++++++ 2 files changed, 324 insertions(+) create mode 100644 custom_components/tuya_local/devices/tongou_qcb2wb_breaker.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index a97ab9fbec..bf261072c3 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -589,3 +589,4 @@ Further device support has been made with the assistance of users. Please consid - [ewandank](https://github.com/ewandank) for contributing support for Kogan LX-8 vacuum robots. - [rac146](https://github.com/rac146) for contributing support for Zemismart ZM25R2 roller shades. - [Nuwisam](https://github.com/Nuwisam) for contributing doc fixes. +- [jorgeal94](https://github.com/jorgeal94) for assisting with support for another Tongou QCB2 circuit breaker variant. diff --git a/custom_components/tuya_local/devices/tongou_qcb2wb_breaker.yaml b/custom_components/tuya_local/devices/tongou_qcb2wb_breaker.yaml new file mode 100644 index 0000000000..3b3d5fb15d --- /dev/null +++ b/custom_components/tuya_local/devices/tongou_qcb2wb_breaker.yaml @@ -0,0 +1,323 @@ +name: Circuit breaker +products: + - id: 58bfahc5yvdpvpwd + name: Tongou ATQCB2-JWT +primary_entity: + entity: sensor + class: energy + dps: + - id: 1 + type: integer + name: sensor + unit: kWh + class: total_increasing + mapping: + - scale: 100 +secondary_entities: + - entity: sensor + name: Leakage current + class: current + category: diagnostic + dps: + - id: 15 + type: integer + name: sensor + unit: mA + class: measurement + - entity: switch + name: Breaker + dps: + - id: 16 + type: boolean + name: switch + - id: 124 + type: integer + optional: true + name: signal + - id: 125 + type: string + optional: true + name: firmware_version + - entity: button + name: Leakage test + category: config + dps: + - id: 101 + type: boolean + name: button + optional: true + - entity: number + name: Current limit + class: current + category: config + dps: + - id: 102 + type: integer + name: value + unit: A + range: + min: 1 + max: 100 + - entity: number + name: Overvoltage limit + class: voltage + category: config + dps: + - id: 103 + type: integer + name: value + unit: V + range: + min: 245 + max: 295 + - entity: number + name: Undervoltage limit + class: voltage + category: config + dps: + - id: 104 + type: integer + name: value + unit: V + range: + min: 145 + max: 220 + - entity: number + name: Leakage current limit + class: current + category: config + dps: + - id: 105 + type: integer + name: value + unit: mA + range: + min: 10 + max: 100 + mapping: + - step: 10 + - entity: sensor + class: voltage + category: diagnostic + dps: + - id: 106 + type: integer + name: sensor + unit: V + class: measurement + mapping: + - scale: 10 + - id: 108 + type: integer + optional: true + name: rated_voltage + - entity: sensor + class: current + category: diagnostic + dps: + - id: 107 + type: integer + name: sensor + unit: A + class: measurement + mapping: + - scale: 1000 + - entity: sensor + class: temperature + category: diagnostic + dps: + - id: 109 + type: integer + name: sensor + unit: C + class: measurement + mapping: + - scale: 10 + - entity: number + class: temperature + name: Temperature limit + category: diagnostic + dps: + - id: 110 + type: integer + name: sensor + unit: C + class: measurement + mapping: + - scale: 10 + range: + min: -400 + max: 1000 + - entity: select + name: Overvoltage action + icon: "mdi:fuse-alert" + category: config + dps: + - id: 111 + type: string + name: option + mapping: + - dps_val: Close + value: Ignore + - dps_val: Alarm + value: Alarm + - dps_val: Trip + value: Trip + - entity: select + name: Undervoltage action + icon: "mdi:fuse-alert" + category: config + dps: + - id: 112 + type: string + name: option + mapping: + - dps_val: Close + value: Ignore + - dps_val: Alarm + value: Alarm + - dps_val: Trip + value: Trip + - entity: select + name: Over current action + icon: "mdi:fuse-alert" + category: config + dps: + - id: 113 + type: string + name: option + mapping: + - dps_val: Close + value: Ignore + - dps_val: Alarm + value: Alarm + - dps_val: Trip + value: Trip + - entity: select + name: Over power action + icon: "mdi:fuse-alert" + category: config + dps: + - id: 114 + type: string + name: option + mapping: + - dps_val: Close + value: Ignore + - dps_val: Alarm + value: Alarm + - dps_val: Trip + value: Trip + - entity: select + name: Over temperature action + icon: "mdi:fuse-alert" + category: config + dps: + - id: 115 + type: string + name: option + mapping: + - dps_val: Close + value: Ignore + - dps_val: Alarm + value: Alarm + - dps_val: Trip + value: Trip + - entity: select + name: Earth leakage action + icon: "mdi:fuse-alert" + category: config + dps: + - id: 116 + type: string + name: option + mapping: + - dps_val: Close + value: Ignore + - dps_val: Alarm + value: Alarm + - dps_val: Trip + value: Trip + - entity: sensor + class: power + category: diagnostic + dps: + - id: 117 + type: integer + name: sensor + unit: W + class: measurement + - entity: number + name: Power limit + class: power + category: config + dps: + - id: 118 + type: integer + name: value + unit: W + range: + min: 5 + max: 25000 + mapping: + - step: 10 + - entity: sensor + name: Event + category: diagnostic + dps: + - id: 119 + type: string + name: sensor + - entity: button + name: Self check + icon: "mdi:check-circle" + category: config + dps: + - id: 120 + type: boolean + name: button + optional: true + - entity: number + name: Self check frequency + category: config + icon: "mdi:check-circle" + dps: + - id: 121 + type: integer + name: value + optional: true + unit: d + range: + min: 1 + max: 100 + mapping: + - dps_val: null + value: 0 + hidden: true + - entity: sensor + name: Self check due + class: duration + category: diagnostic + dps: + - id: 122 + type: integer + optional: true + name: sensor + unit: min + class: measurement + - entity: switch + name: Auto reset + category: config + dps: + - id: 123 + type: boolean + name: switch + - entity: button + name: Factory reset + class: restart + category: config + dps: + - id: 126 + type: boolean + optional: true + name: button From e8309311540a1462a59efcdc7ccef266d488863d Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 8 Jul 2024 22:38:12 +0900 Subject: [PATCH 005/169] Tongou QCB2-WB: add compatible SMR1 device Issue #1935 --- .../tuya_local/devices/tongou_qcb2wb_breaker.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/tongou_qcb2wb_breaker.yaml b/custom_components/tuya_local/devices/tongou_qcb2wb_breaker.yaml index 3b3d5fb15d..e858b645c1 100644 --- a/custom_components/tuya_local/devices/tongou_qcb2wb_breaker.yaml +++ b/custom_components/tuya_local/devices/tongou_qcb2wb_breaker.yaml @@ -1,7 +1,9 @@ name: Circuit breaker products: - id: 58bfahc5yvdpvpwd - name: Tongou ATQCB2-JWT + name: Tongou AT-QCB2-JWT + - id: vhnq3ezhphqggwqt + name: Tongou AT-Q-SMR1-40-JWT primary_entity: entity: sensor class: energy From 9c971510bcefb939620871f1eca9a8ec01332679 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 8 Jul 2024 22:40:20 +0900 Subject: [PATCH 006/169] Docs for SMR1 --- ACKNOWLEDGEMENTS.md | 2 +- DEVICES.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index bf261072c3..930ea888e3 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -589,4 +589,4 @@ Further device support has been made with the assistance of users. Please consid - [ewandank](https://github.com/ewandank) for contributing support for Kogan LX-8 vacuum robots. - [rac146](https://github.com/rac146) for contributing support for Zemismart ZM25R2 roller shades. - [Nuwisam](https://github.com/Nuwisam) for contributing doc fixes. -- [jorgeal94](https://github.com/jorgeal94) for assisting with support for another Tongou QCB2 circuit breaker variant. +- [jorgeal94](https://github.com/jorgeal94) for assisting with support for another Tongou QCB2 circuit breaker variant and compatible Tongou SMR1 circuit breaker. diff --git a/DEVICES.md b/DEVICES.md index fc04a265ca..91469fbc87 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -362,6 +362,7 @@ - Taxnele circuit breaker and energy meter - TOMPD-63LW energy meter circuit breaker - Tongou QCB2-WB WiFi 4P circuit breaker (3-phase and single phase variants) +- Tongou SMR1 circuit breaker - Tongou ST463JWT 4P 3-phase circuit breaker - V-WIFI-DL02-ES energy consumption clamp meter - WDYK 2P63A energy meter From 65cccb747359d23143bad7126d9ad774414160e6 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 9 Jul 2024 10:40:38 +0900 Subject: [PATCH 007/169] Tongou QCB2-WB: temperature limit is number, not sensor --- custom_components/tuya_local/devices/tongou_qcb2wb_breaker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/tongou_qcb2wb_breaker.yaml b/custom_components/tuya_local/devices/tongou_qcb2wb_breaker.yaml index e858b645c1..1ac38acdd3 100644 --- a/custom_components/tuya_local/devices/tongou_qcb2wb_breaker.yaml +++ b/custom_components/tuya_local/devices/tongou_qcb2wb_breaker.yaml @@ -142,7 +142,7 @@ secondary_entities: dps: - id: 110 type: integer - name: sensor + name: value unit: C class: measurement mapping: From 6c0c9c7a43dc1dc785e16c9aa28c1652459399be Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 9 Jul 2024 21:53:15 +0900 Subject: [PATCH 008/169] Add support for Gosund SP112 USB smartplug Issue #2055 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + .../devices/gosund_sp112_usbsmartplug.yaml | 159 ++++++++++++++++++ 3 files changed, 161 insertions(+) create mode 100644 custom_components/tuya_local/devices/gosund_sp112_usbsmartplug.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 930ea888e3..f6b1e94fc2 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -590,3 +590,4 @@ Further device support has been made with the assistance of users. Please consid - [rac146](https://github.com/rac146) for contributing support for Zemismart ZM25R2 roller shades. - [Nuwisam](https://github.com/Nuwisam) for contributing doc fixes. - [jorgeal94](https://github.com/jorgeal94) for assisting with support for another Tongou QCB2 circuit breaker variant and compatible Tongou SMR1 circuit breaker. +- [ifumadjiev](https:github.com/ifumadjiev) for assisting with support for Gosund SP112 USB smartplug. diff --git a/DEVICES.md b/DEVICES.md index 91469fbc87..5104cebfce 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -409,6 +409,7 @@ the best option. - Eightree ET43 3-outlet powerstrip with energy monitoring - ES01 3 outlet + USB powerstrip with individual timers - Gosund P1 3 outlet + USB powerstrip with power monitoring +- Gosund SP112 RTL energy monitoring smartplug with USB - Grid Connect double outlet wall socket - Grid Connect double outlet with Energy Monitoring, Master and Individual switches and Child Lock - Grid Connect USB charger with power socket diff --git a/custom_components/tuya_local/devices/gosund_sp112_usbsmartplug.yaml b/custom_components/tuya_local/devices/gosund_sp112_usbsmartplug.yaml new file mode 100644 index 0000000000..6e30174c56 --- /dev/null +++ b/custom_components/tuya_local/devices/gosund_sp112_usbsmartplug.yaml @@ -0,0 +1,159 @@ +name: Smartplug +products: + - id: zmql6aexy8ua5rox + name: Gosund SP112-RTL +primary_entity: + entity: switch + class: outlet + dps: + - id: 1 + name: switch + type: boolean + - id: 21 + name: factory_test + type: bitfield + - id: 41 + name: cycle_time + type: base64 + - id: 42 + name: random_time + type: base64 + - id: 43 + name: inching + type: base64 + - id: 101 + name: unknown_101 + type: boolean + optional: true +secondary_entities: + - entity: switch + name: USB + dps: + - id: 7 + type: boolean + name: switch + - entity: sensor + name: Energy + category: diagnostic + dps: + - id: 17 + type: integer + name: sensor + unit: Wh + optional: true + - id: 25 + type: integer + name: calibration + optional: true + - entity: sensor + class: current + category: diagnostic + dps: + - id: 18 + type: integer + name: sensor + unit: mA + class: measurement + force: true + - id: 23 + type: integer + name: calibration + optional: true + - entity: sensor + class: power + category: diagnostic + dps: + - id: 19 + type: integer + name: sensor + unit: W + class: measurement + force: true + mapping: + - scale: 10 + - id: 24 + type: integer + name: calibration + optional: true + - entity: sensor + class: voltage + category: diagnostic + dps: + - id: 20 + type: integer + name: sensor + unit: V + class: measurement + force: true + mapping: + - scale: 10 + - id: 22 + type: integer + name: calibration + optional: true + - entity: number + translation_key: timer + category: config + dps: + - id: 9 + type: integer + name: value + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + step: 60 + - entity: number + name: USB timer + category: config + translation_key: timer + dps: + - id: 15 + type: integer + name: value + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + step: 60 + - entity: select + name: Initial state + icon: "mdi:toggle-switch" + category: config + dps: + - id: 38 + type: string + name: option + mapping: + - dps_val: "1" + value: "On" + - dps_val: "0" + value: "Off" + - dps_val: "2" + value: Last state + - entity: select + name: Light mode + icon: "mdi:lightbulb" + category: config + dps: + - id: 39 + type: string + name: option + mapping: + - dps_val: relay + value: State + - dps_val: pos + value: Position + - dps_val: none + value: "Off" + - entity: lock + translation_key: child_lock + category: config + dps: + - id: 40 + type: boolean + name: lock From 579599d34ef4a758a543c070dd7462cd37024195 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 9 Jul 2024 22:52:00 +0900 Subject: [PATCH 009/169] Klarstein Iceblock: separate power from mode The device appears to only support single dps changes. PR #2001 comment --- .../klarstein_iceblock_airconditioner.yaml | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/custom_components/tuya_local/devices/klarstein_iceblock_airconditioner.yaml b/custom_components/tuya_local/devices/klarstein_iceblock_airconditioner.yaml index 46ed096cef..cf3491d5cb 100644 --- a/custom_components/tuya_local/devices/klarstein_iceblock_airconditioner.yaml +++ b/custom_components/tuya_local/devices/klarstein_iceblock_airconditioner.yaml @@ -5,22 +5,6 @@ name: Air conditioner primary_entity: entity: climate dps: - - id: 1 - name: hvac_mode - type: boolean - mapping: - - dps_val: false - value: "off" - - dps_val: true - constraint: work_mode - conditions: - - dps_val: "1" - value: cool - - dps_val: "3" - value: dry - - dps_val: "5" - value: fan_only - hidden: true - id: 2 type: integer name: temperature @@ -51,9 +35,14 @@ primary_entity: - dps_val: 0 value: "OK" - id: 101 - name: work_mode + name: hvac_mode type: string - hidden: true + - dps_val: "1" + value: cool + - dps_val: "3" + value: dry + - dps_val: "5" + value: fan_only - id: 103 name: preset_mode type: boolean @@ -91,6 +80,13 @@ primary_entity: hidden: true optional: true secondary_entities: + - entity: switch + name: Power + icon: "mdi:power" + dps: + - id: 1 + type: boolean + name: switch - entity: number translation_key: timer category: config From e8427c679129863e4e90efd6d0796a793c3c718c Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 9 Jul 2024 23:03:32 +0900 Subject: [PATCH 010/169] Klarstein Iceblock: correct hvac_mode mapping Add product id from #2096 --- .../klarstein_iceblock_airconditioner.yaml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/custom_components/tuya_local/devices/klarstein_iceblock_airconditioner.yaml b/custom_components/tuya_local/devices/klarstein_iceblock_airconditioner.yaml index cf3491d5cb..3f170a107d 100644 --- a/custom_components/tuya_local/devices/klarstein_iceblock_airconditioner.yaml +++ b/custom_components/tuya_local/devices/klarstein_iceblock_airconditioner.yaml @@ -1,7 +1,7 @@ name: Air conditioner -# products: -# - id: UNKNOWN -# name: Klarstein Iceblock Ecosmart +products: + - id: hmwftdaaxejmjtfe + name: Klarstein Iceblock Ecosmart primary_entity: entity: climate dps: @@ -37,12 +37,13 @@ primary_entity: - id: 101 name: hvac_mode type: string - - dps_val: "1" - value: cool - - dps_val: "3" - value: dry - - dps_val: "5" - value: fan_only + mapping: + - dps_val: "1" + value: cool + - dps_val: "3" + value: dry + - dps_val: "5" + value: fan_only - id: 103 name: preset_mode type: boolean From c61db34e59ed8108e505ea91b1fbb200fa64f574 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 10 Jul 2024 18:11:20 +0900 Subject: [PATCH 011/169] Kolanky EV charger: improve compatibility - no_connect is misspelled no_connet in actual protocol (supported by details in original report #1853) - Charging time needs to be optional (probably only reported when a charging session is active or recently finished) --- custom_components/tuya_local/devices/kolanky_evcharger.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/kolanky_evcharger.yaml b/custom_components/tuya_local/devices/kolanky_evcharger.yaml index 41724ea6a3..ffe9b13c69 100644 --- a/custom_components/tuya_local/devices/kolanky_evcharger.yaml +++ b/custom_components/tuya_local/devices/kolanky_evcharger.yaml @@ -12,7 +12,7 @@ primary_entity: type: string name: sensor mapping: - - dps_val: no_connect + - dps_val: no_connet value: Disconnected - dps_val: connect value: Connected @@ -140,6 +140,7 @@ secondary_entities: dps: - id: 120 type: integer + optional: true name: sensor unit: min mapping: From 55e4fe0547876a1ff7030ca767d70bc27d11b0a9 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 11 Jul 2024 17:33:20 +0900 Subject: [PATCH 012/169] Smartplugv2 Energy: use actual product id for Arlec PC191HA The id seemed to be a device id, not product id. Use product id from PR #2101 instead. --- custom_components/tuya_local/devices/smartplugv2_energy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/smartplugv2_energy.yaml b/custom_components/tuya_local/devices/smartplugv2_energy.yaml index 7762bbc77a..b5fd9f9b10 100644 --- a/custom_components/tuya_local/devices/smartplugv2_energy.yaml +++ b/custom_components/tuya_local/devices/smartplugv2_energy.yaml @@ -1,6 +1,6 @@ name: Advanced energy monitoring smartplug products: - - id: bf819f3f0e0f958b17ufid + - id: auojpnb4hpc13ftb name: Arlec PC191HA - id: 2fxr6sttw70cgbau name: Antela ZY-OYD-Y From b4e2b1797ec009e1888fc0ea1035c54662da227a Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 11 Jul 2024 20:56:35 +0900 Subject: [PATCH 013/169] Goodcell EV charger: make alt charge current optional Based on #2102 (for Feyree Fey123), which almost matches except for this dp. Likely this is only reported when in the mode it is used. --- custom_components/tuya_local/devices/goodcell_ev_charger.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/tuya_local/devices/goodcell_ev_charger.yaml b/custom_components/tuya_local/devices/goodcell_ev_charger.yaml index 7723d6d06a..c2a7f7d9c5 100644 --- a/custom_components/tuya_local/devices/goodcell_ev_charger.yaml +++ b/custom_components/tuya_local/devices/goodcell_ev_charger.yaml @@ -121,6 +121,7 @@ secondary_entities: max: 16 - id: 114 type: integer + optional: true name: value_alt unit: A range: From a83bf81eb6cd0562ad15c6420228457cbd045fa9 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 11 Jul 2024 21:50:57 +0900 Subject: [PATCH 014/169] Add support for Tesla S300 air purifier Issue #1936 --- ACKNOWLEDGEMENTS.md | 3 +- DEVICES.md | 2 +- .../devices/tesla_air_purifier_mini.yaml | 1 + .../devices/tesla_air_purifier_pro.yaml | 3 +- .../devices/tesla_s300_purifier.yaml | 172 ++++++++++++++++++ 5 files changed, 178 insertions(+), 3 deletions(-) create mode 100644 custom_components/tuya_local/devices/tesla_s300_purifier.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index f6b1e94fc2..2b54f29280 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -590,4 +590,5 @@ Further device support has been made with the assistance of users. Please consid - [rac146](https://github.com/rac146) for contributing support for Zemismart ZM25R2 roller shades. - [Nuwisam](https://github.com/Nuwisam) for contributing doc fixes. - [jorgeal94](https://github.com/jorgeal94) for assisting with support for another Tongou QCB2 circuit breaker variant and compatible Tongou SMR1 circuit breaker. -- [ifumadjiev](https:github.com/ifumadjiev) for assisting with support for Gosund SP112 USB smartplug. +- [ifumadjiev](https://github.com/ifumadjiev) for assisting with support for Gosund SP112 USB smartplug. +- [Trychlik](https://github.com/Trychlik) for assisting with support for Tesla S300 air purifier. diff --git a/DEVICES.md b/DEVICES.md index 5104cebfce..07e932e9b7 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -252,7 +252,7 @@ - Soho SO-350WUI Air Purifier - Soleusair A02 and A10 air purifiers - Stadler Form Roger air purifier -- Tesla Smart Pro and Mini air purifiers +- Tesla S300, Smart Pro and Mini air purifiers - Vork VK6067AW air purifier ### Dehumidifiers diff --git a/custom_components/tuya_local/devices/tesla_air_purifier_mini.yaml b/custom_components/tuya_local/devices/tesla_air_purifier_mini.yaml index f81801882b..dd26c25c48 100644 --- a/custom_components/tuya_local/devices/tesla_air_purifier_mini.yaml +++ b/custom_components/tuya_local/devices/tesla_air_purifier_mini.yaml @@ -1,6 +1,7 @@ name: Tesla smart air purifier mini products: - id: sgodozglgymucvq2 + name: Tesla Air Mini primary_entity: entity: fan translation_only_key: fan_with_presets diff --git a/custom_components/tuya_local/devices/tesla_air_purifier_pro.yaml b/custom_components/tuya_local/devices/tesla_air_purifier_pro.yaml index 23d169f82f..7a518f0dc1 100644 --- a/custom_components/tuya_local/devices/tesla_air_purifier_pro.yaml +++ b/custom_components/tuya_local/devices/tesla_air_purifier_pro.yaml @@ -1,6 +1,7 @@ -name: Tesla Pro M smart air purifier +name: Air purifier products: - id: 3hjcrjktvkoim7zu + name: Tesla Air Pro M primary_entity: entity: fan translation_only_key: fan_with_presets diff --git a/custom_components/tuya_local/devices/tesla_s300_purifier.yaml b/custom_components/tuya_local/devices/tesla_s300_purifier.yaml new file mode 100644 index 0000000000..e2793ca5f6 --- /dev/null +++ b/custom_components/tuya_local/devices/tesla_s300_purifier.yaml @@ -0,0 +1,172 @@ +name: Air purifier +products: + - id: 7v1gn9wmbqvtcqkc + name: Tesla Air S300 +primary_entity: + entity: fan + dps: + - id: 1 + type: boolean + name: switch + - id: 4 + type: string + name: speed + mapping: + - dps_val: "1" + value: 14 + - dps_val: "2" + value: 28 + - dps_val: "3" + value: 42 + - dps_val: "4" + value: 57 + - dps_val: "5" + value: 71 + - dps_val: "6" + value: 85 + - dps_val: "7" + value: 100 +secondary_entities: + - entity: sensor + class: pm25 + category: diagnostic + dps: + - id: 2 + type: integer + name: sensor + unit: ugm3 + class: measurement + - entity: sensor + name: Filter + category: diagnostic + dps: + - id: 5 + type: integer + name: sensor + unit: "%" + - entity: switch + translation_key: ionizer + category: config + dps: + - id: 6 + type: boolean + name: switch + - entity: lock + translation_key: child_lock + category: config + dps: + - id: 7 + type: boolean + name: lock + optional: true + mapping: + - dps_val: null + value: false + hidden: true + - entity: switch + translation_key: uv_sterilization + category: config + dps: + - id: 9 + type: boolean + name: switch + - entity: button + name: Filter reset + class: restart + category: config + dps: + - id: 11 + type: boolean + optional: true + name: button + - entity: select + translation_key: timer + category: config + dps: + - id: 18 + type: string + name: option + mapping: + - dps_val: cancel + value: "Off" + - dps_val: "1h" + value: "1 hour" + - dps_val: "2h" + value: "2 hours" + - dps_val: "3h" + value: "3 hours" + - dps_val: "4h" + value: "4 hours" + - dps_val: "5h" + value: "5 hours" + - dps_val: "6h" + value: "6 hours" + - dps_val: "7h" + value: "7 hours" + - dps_val: "8h" + value: "8 hours" + - dps_val: "9h" + value: "9 hours" + - dps_val: "10h" + value: "10 hours" + - dps_val: "11h" + value: "11 hours" + - dps_val: "12h" + value: "12 hours" + - entity: sensor + name: Air quality + class: enum + category: diagnostic + dps: + - id: 21 + type: string + name: sensor + mapping: + - dps_val: great + value: Great + - dps_val: mild + value: Mild + - dps_val: good + value: Good + - dps_val: medium + value: Medium + - entity: binary_sensor + class: problem + category: diagnostic + dps: + - id: 22 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - id: 22 + type: bitfield + name: fault_code + - entity: switch + name: Mute + icon: "mdi:volume-mute" + category: config + dps: + - id: 104 + type: boolean + name: switch + - entity: select + name: Light + icon: "mdi:lightbulb" + dps: + - id: 105 + type: string + name: option + mapping: + - dps_val: "off" + value: "Off" + - dps_val: orange + value: Orange + - dps_val: green + value: Green + - dps_val: blue + value: Blue + - dps_val: yellow + value: Yellow From 7a88cc83f4c203633c11421365f6dcac51f8f25d Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 11 Jul 2024 22:41:35 +0900 Subject: [PATCH 015/169] Config flow: modify the log message requesting to report dps To avoid confusion, we only want reports following the new device template. The message by itself is not a bug, and should not be reported as a bug without other supporting info. --- custom_components/tuya_local/config_flow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/tuya_local/config_flow.py b/custom_components/tuya_local/config_flow.py index 3143048416..7050ff1eca 100644 --- a/custom_components/tuya_local/config_flow.py +++ b/custom_components/tuya_local/config_flow.py @@ -403,7 +403,7 @@ async def async_step_search(self, user_input=None): self.__cloud_device["ip"] = local_device["ip"] self.__cloud_device["version"] = local_device["version"] else: - _LOGGER.warn(f"Could not find device: {self.__cloud_device['id']}") + _LOGGER.warning(f"Could not find device: {self.__cloud_device['id']}") return await self.async_step_local(None) return self.async_show_form( @@ -487,7 +487,7 @@ async def async_step_select_type(self, user_input=None): log_json(dps), ) _LOGGER.warning( - "Report this to https://github.com/make-all/tuya-local/issues/", + "Include the previous log message with any new device request to https://github.com/make-all/tuya-local/issues/", ) if types: return self.async_show_form( From b362884b1e9afa136750c72018455968feaa3b8f Mon Sep 17 00:00:00 2001 From: Wade Penner Date: Mon, 1 Jul 2024 09:15:24 -0400 Subject: [PATCH 016/169] Add support for PlantsIO Ivy smart planter --- DEVICES.md | 1 + .../devices/plantsio_ivy_smart_planter.yaml | 431 ++++++++++++++++++ 2 files changed, 432 insertions(+) create mode 100644 custom_components/tuya_local/devices/plantsio_ivy_smart_planter.yaml diff --git a/DEVICES.md b/DEVICES.md index 07e932e9b7..9e0c775e0d 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -710,6 +710,7 @@ port and password. - Nedis WIFISA10CWT air quality monitor - PGST PA-010 indoor temperature and humidity sensor - PH-W218 water quality monitor +- PlantsIO Ivy smart planter - PV28-CW 8 in 1 air quality monitor - SD123 HPR01 human presence radar - Silvercrest coffee maker diff --git a/custom_components/tuya_local/devices/plantsio_ivy_smart_planter.yaml b/custom_components/tuya_local/devices/plantsio_ivy_smart_planter.yaml new file mode 100644 index 0000000000..71a66dd799 --- /dev/null +++ b/custom_components/tuya_local/devices/plantsio_ivy_smart_planter.yaml @@ -0,0 +1,431 @@ +# Datapoints documented at: +# https://gist.github.com/thewade/ef9f6014f13932bd2e77d43331e2027d + +name: Smart Planter +products: + - id: 8n3q0y4cwov8ifxt + name: PlantsIO Ivy Smart Planter +primary_entity: + entity: sensor + name: Water level + dps: + - id: 108 + type: integer + name: sensor + unit: mL + class: measurement + mapping: + - dps_val: 0 + icon: "mdi:cup-outline" + - icon: "mdi:cup" + - id: 107 + type: string + name: version +secondary_entities: + # Sensor entities + - entity: sensor + name: Ambient light + class: illuminance + dps: + - id: 103 + type: integer + name: sensor + unit: lx + class: measurement + - entity: sensor + name: Temperature + class: temperature + dps: + - id: 104 + type: integer + name: sensor + unit: C + class: measurement + mapping: + - scale: 10 + - entity: sensor + name: Humidity + class: humidity + dps: + - id: 105 + type: integer + name: sensor + unit: "%" + class: measurement + - entity: sensor + name: Soil moisture + class: moisture + dps: + - id: 122 + name: sensor + type: integer + optional: true + unit: "%" + - entity: sensor + name: Water status + icon: "mdi:watering-can" + class: enum + dps: + - id: 106 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: "Initializing" + - dps_val: 2 + value: "Drinking" + - value: "Unknown state" + - entity: sensor + name: Light status + icon: "mdi:brightness-5" + class: enum + dps: + - id: 138 + type: bitfield + name: sensor + mapping: + - dps_val: 1 + value: "Acceptable" + - dps_val: 2 + value: "Good" + - dps_val: 3 + value: "Exceptional" + - dps_val: 4 + value: "Too Much" + - dps_val: 5 + value: "Insufficient" + - value: "Unknown state" + - entity: sensor + name: Temperature status + icon: "mdi:thermometer" + class: enum + dps: + - id: 139 + type: bitfield + name: sensor + mapping: + - dps_val: 1 + value: "Good" + - dps_val: 2 + value: "Hot" + icon: "mdi:thermometer-high" + - dps_val: 3 + value: "Cold" + icon: "mdi:thermometer-low" + - value: "Unknown state" + - entity: sensor + name: Humidity status + class: enum + icon: "mdi:water-percent" + dps: + - id: 140 + type: bitfield + name: sensor + mapping: + - dps_val: 1 + value: "Good" + - value: "Unknown state" + # Diagnostic entities + - entity: sensor + name: Battery + class: battery + category: diagnostic + dps: + - id: 121 + type: integer + name: sensor + unit: "%" + - entity: sensor + name: Charge state + class: enum + category: diagnostic + dps: + - id: 109 + type: boolean + name: sensor + mapping: + - dps_val: false + value: "Battery" + icon: "mdi:battery" + - dps_val: true + value: "Charging" + icon: "mdi:battery-charging" + - entity: sensor + name: Pot state + class: enum + category: diagnostic + dps: + - id: 102 + type: boolean + name: sensor + mapping: + - dps_val: false + value: "Empty" + icon: "mdi:cup-off-outline" + - dps_val: true + value: "Plant in pot" + icon: "mdi:sprout" + - entity: sensor + name: Touching + category: diagnostic + icon: "mdi:gesture-tap" + dps: + - id: 111 + type: string + name: sensor + # Config entities + - entity: select + translation_key: temperature_unit + category: config + dps: + - id: 130 + type: boolean + name: option + mapping: + - dps_val: false + value: celsius + - dps_val: true + value: fahrenheit + - entity: select + name: Color + icon: "mdi:palette" + category: config + dps: + - id: 113 + type: bitfield + name: option + mapping: + - dps_val: 0 + value: "White" + - dps_val: 1 + value: "Yellow" + - dps_val: 2 + value: "Green" + - dps_val: 3 + value: "Pink" + - dps_val: 4 + value: "Purple" + - entity: select + name: Plant type + icon: "mdi:sprout" + category: config + dps: + - id: 119 + type: integer + name: option + mapping: + - dps_val: 1 + value: "Devil's Ivy" + - dps_val: 2 + value: "Dwarf Umbrella Tree" + - dps_val: 3 + value: "Spider Plant" + - dps_val: 4 + value: "Parlor Palm" + - dps_val: 5 + value: "Buddist Pine" + - dps_val: 6 + value: "Arrowhead Plant (Pink)" + - dps_val: 7 + value: "Arrowhead Plant (Green)" + - dps_val: 8 + value: "Arrowhead Plant (Marble)" + - dps_val: 9 + value: "Philidendron Congo" + - dps_val: 10 + value: "Orange Jasmine" + - dps_val: 11 + value: "Perls and Jade" + - dps_val: 12 + value: "Rubber Tree" + - dps_val: 13 + value: "Baby Rubber Plant" + - dps_val: 14 + value: "Silver Goosefoot" + - dps_val: 15 + value: "Swiss Cheese" + - dps_val: 16 + value: "Dumb Cane" + - dps_val: 17 + value: "Common Ivy" + - dps_val: 18 + value: "Aluminum Plant" + - dps_val: 19 + value: "Bird of Paradise" + - dps_val: 20 + value: "Asian Bell Tree" + - dps_val: 21 + value: "Satin Pothos" + - dps_val: 22 + value: "Heartleaf Philodendron" + - dps_val: 23 + value: "Raindrop Peperomia" + - dps_val: 24 + value: "Parallel Peperomia" + - dps_val: 25 + value: "Watermelon Peperomia" + - dps_val: 26 + value: "Nerve Plant" + - dps_val: 27 + value: "Peacock Plant" + - dps_val: 28 + value: "Calathea Freddie" + - dps_val: 29 + value: "Orbifolia Prayer Plant" + - dps_val: 30 + value: "Bird's Nest Fern" + - dps_val: 31 + value: "Squirrel's Foot Fern" + - dps_val: 32 + value: "Heart Leaf Fern" + - dps_val: 33 + value: "Cretan Brake" + - dps_val: 34 + value: "Florist Kalanchoe" + - dps_val: 35 + value: "Ruby Glow" + - dps_val: 36 + value: "Succulents" + - dps_val: 37 + value: "Marjoram" + - dps_val: 38 + value: "Rosemary" + - dps_val: 39 + value: "Basil" + - dps_val: 40 + value: "Mint" + - dps_val: 41 + value: "Parsley" + - dps_val: 42 + value: "Catnip" + - dps_val: 43 + value: "Avocado" + - dps_val: 44 + value: "Tiger Lily" + - dps_val: 45 + value: "Cilantro" + - entity: switch + name: Touch perception + category: config + icon: "mdi:gesture-tap" + dps: + - id: 110 + type: boolean + name: switch + - entity: switch + name: Auto brightness + category: config + icon: "mdi:brightness-auto" + dps: + - id: 135 + type: boolean + name: switch + - entity: number + name: Brightness + category: config + icon: "mdi:brightness-percent" + dps: + - id: 101 + type: integer + name: value + range: + min: 0 + max: 100 + - entity: switch + name: Sound perception + category: config + icon: "mdi:ear-hearing" + dps: + - id: 125 + type: boolean + name: switch + mapping: + - dps_val: false + icon: "mdi:ear-hearing-off" + - entity: number + name: Sound sensitivity + category: config + icon: "mdi:ear-hearing" + dps: + - id: 115 + type: integer + name: value + range: + min: 0 + max: 100 + - entity: switch + name: Plant detection + category: config + icon: "mdi:radar" + dps: + - id: 123 + type: boolean + name: switch + - entity: number + name: Plant detection sensitivity + category: config + icon: "mdi:radar" + dps: + - id: 116 + type: integer + name: value + range: + min: 0 + max: 100 + - entity: switch + name: Night sleep + icon: "mdi:moon-waning-crescent" + category: config + dps: + - id: 131 + type: boolean + name: switch + - entity: switch + name: Smart sleep + icon: "mdi:sleep" + category: config + dps: + - id: 132 + type: boolean + name: switch + mapping: + - dps_val: false + icon: "mdi:sleep-off" + - entity: button + name: Manual calibration + category: config + icon: "mdi:scale-balance" + dps: + - id: 124 + type: boolean + name: button + - entity: select + name: Time format + icon: "mdi:clock" + category: config + dps: + - id: 136 + type: boolean + name: option + mapping: + - dps_val: false + value: "12 Hour Clock" + - dps_val: true + value: "24 Hour Clock" + - entity: select + name: Language + icon: "mdi:translate" + category: config + dps: + - id: 144 + type: integer + name: option + mapping: + - dps_val: 0 + value: "Chinese" + - dps_val: 1 + value: "English" + - dps_val: 2 + value: "Japanese" + - dps_val: 3 + value: "French" From b9c894b7c87934e17685850dc4d50a80f03a0316 Mon Sep 17 00:00:00 2001 From: Wade Penner Date: Sat, 6 Jul 2024 09:22:33 -0400 Subject: [PATCH 017/169] Update support for PlantsIO Ivy smart planter - fix most enums to use integer instead of bitfield - use volume_storage class for water level - add absorbing state to water status - add initilizing states from missing enums - use binary_sensor entity and battery_charging class for charging status - convert plant in pot to binary_sensor - add not selected enum for plant type - add config options for weather and weather location --- .../devices/plantsio_ivy_smart_planter.yaml | 85 +++++++++++++------ 1 file changed, 59 insertions(+), 26 deletions(-) diff --git a/custom_components/tuya_local/devices/plantsio_ivy_smart_planter.yaml b/custom_components/tuya_local/devices/plantsio_ivy_smart_planter.yaml index 71a66dd799..5225e9b08a 100644 --- a/custom_components/tuya_local/devices/plantsio_ivy_smart_planter.yaml +++ b/custom_components/tuya_local/devices/plantsio_ivy_smart_planter.yaml @@ -8,6 +8,7 @@ products: primary_entity: entity: sensor name: Water level + class: volume_storage dps: - id: 108 type: integer @@ -22,7 +23,7 @@ primary_entity: type: string name: version secondary_entities: - # Sensor entities + # Sensor entities raw - entity: sensor name: Ambient light class: illuminance @@ -61,19 +62,22 @@ secondary_entities: type: integer optional: true unit: "%" + # Sensor entities intelligent - entity: sensor name: Water status icon: "mdi:watering-can" class: enum dps: - id: 106 - type: bitfield + type: integer name: sensor mapping: - dps_val: 0 value: "Initializing" - dps_val: 2 value: "Drinking" + - dps_val: 3 + value: "Absorbing from soil" - value: "Unknown state" - entity: sensor name: Light status @@ -81,9 +85,11 @@ secondary_entities: class: enum dps: - id: 138 - type: bitfield + type: integer name: sensor mapping: + - dps_val: 0 + value: "Initializing" - dps_val: 1 value: "Acceptable" - dps_val: 2 @@ -101,9 +107,11 @@ secondary_entities: class: enum dps: - id: 139 - type: bitfield + type: integer name: sensor mapping: + - dps_val: 0 + value: "Initializing" - dps_val: 1 value: "Good" - dps_val: 2 @@ -115,13 +123,15 @@ secondary_entities: - value: "Unknown state" - entity: sensor name: Humidity status - class: enum icon: "mdi:water-percent" + class: enum dps: - id: 140 - type: bitfield + type: integer name: sensor mapping: + - dps_val: 0 + value: "Initializing" - dps_val: 1 value: "Good" - value: "Unknown state" @@ -135,44 +145,31 @@ secondary_entities: type: integer name: sensor unit: "%" - - entity: sensor + - entity: binary_sensor name: Charge state - class: enum + class: battery_charging category: diagnostic dps: - id: 109 type: boolean name: sensor - mapping: - - dps_val: false - value: "Battery" - icon: "mdi:battery" - - dps_val: true - value: "Charging" - icon: "mdi:battery-charging" - entity: sensor - name: Pot state - class: enum + name: Plant in pot + class: problem category: diagnostic dps: - id: 102 type: boolean name: sensor - mapping: - - dps_val: false - value: "Empty" - icon: "mdi:cup-off-outline" - - dps_val: true - value: "Plant in pot" - icon: "mdi:sprout" - entity: sensor name: Touching - category: diagnostic icon: "mdi:gesture-tap" + category: diagnostic dps: - id: 111 type: string name: sensor + optional: true # Config entities - entity: select translation_key: temperature_unit @@ -192,7 +189,7 @@ secondary_entities: category: config dps: - id: 113 - type: bitfield + type: integer name: option mapping: - dps_val: 0 @@ -214,6 +211,8 @@ secondary_entities: type: integer name: option mapping: + - dps_val: 0 + value: "Not selected" - dps_val: 1 value: "Devil's Ivy" - dps_val: 2 @@ -429,3 +428,37 @@ secondary_entities: value: "Japanese" - dps_val: 3 value: "French" + - entity: switch + name: Location weather + icon: "mdi:weather-pouring" + category: config + dps: + - id: 141 + type: boolean + name: switch + - entity: number + name: Latitude + category: config + icon: "mdi:latitude" + dps: + - id: 143 + type: integer + name: value + range: + min: -900000 + max: 900000 + mapping: + - scale: 10000 + - entity: number + name: Longitude + category: config + icon: "mdi:longitude" + dps: + - id: 142 + type: integer + name: value + range: + min: -1800000 + max: 1800000 + mapping: + - scale: 10000 From 7a53bc1c381830a90e1ff83f1c8a37f2e8af1e00 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Fri, 12 Jul 2024 20:57:44 +0900 Subject: [PATCH 018/169] Plantsio Ivy: changes from review - remove unnecessary names to allow translations to be used - fix use of binary_sensor - remove inappropriate class - use target language for language names - use light entity for display brightness --- .../devices/plantsio_ivy_smart_planter.yaml | 35 ++++++------------- 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/custom_components/tuya_local/devices/plantsio_ivy_smart_planter.yaml b/custom_components/tuya_local/devices/plantsio_ivy_smart_planter.yaml index 5225e9b08a..afd8870d7a 100644 --- a/custom_components/tuya_local/devices/plantsio_ivy_smart_planter.yaml +++ b/custom_components/tuya_local/devices/plantsio_ivy_smart_planter.yaml @@ -25,7 +25,6 @@ primary_entity: secondary_entities: # Sensor entities raw - entity: sensor - name: Ambient light class: illuminance dps: - id: 103 @@ -34,7 +33,6 @@ secondary_entities: unit: lx class: measurement - entity: sensor - name: Temperature class: temperature dps: - id: 104 @@ -45,7 +43,6 @@ secondary_entities: mapping: - scale: 10 - entity: sensor - name: Humidity class: humidity dps: - id: 105 @@ -54,7 +51,6 @@ secondary_entities: unit: "%" class: measurement - entity: sensor - name: Soil moisture class: moisture dps: - id: 122 @@ -137,7 +133,6 @@ secondary_entities: - value: "Unknown state" # Diagnostic entities - entity: sensor - name: Battery class: battery category: diagnostic dps: @@ -146,30 +141,19 @@ secondary_entities: name: sensor unit: "%" - entity: binary_sensor - name: Charge state class: battery_charging category: diagnostic dps: - id: 109 type: boolean name: sensor - - entity: sensor + - entity: binary_sensor name: Plant in pot - class: problem category: diagnostic dps: - id: 102 type: boolean name: sensor - - entity: sensor - name: Touching - icon: "mdi:gesture-tap" - category: diagnostic - dps: - - id: 111 - type: string - name: sensor - optional: true # Config entities - entity: select translation_key: temperature_unit @@ -311,6 +295,10 @@ secondary_entities: - id: 110 type: boolean name: switch + - id: 111 + type: string + name: touching + optional: true - entity: switch name: Auto brightness category: config @@ -319,14 +307,13 @@ secondary_entities: - id: 135 type: boolean name: switch - - entity: number - name: Brightness + - entity: light + translation_key: display category: config - icon: "mdi:brightness-percent" dps: - id: 101 type: integer - name: value + name: brightness range: min: 0 max: 100 @@ -421,13 +408,13 @@ secondary_entities: name: option mapping: - dps_val: 0 - value: "Chinese" + value: "中文" - dps_val: 1 value: "English" - dps_val: 2 - value: "Japanese" + value: "日本語" - dps_val: 3 - value: "French" + value: "Français" - entity: switch name: Location weather icon: "mdi:weather-pouring" From f118d0be4188af7e64afcbbdf53f9d95f86a7bdf Mon Sep 17 00:00:00 2001 From: Bo Jeanes Date: Sat, 6 Jul 2024 18:53:14 +1000 Subject: [PATCH 019/169] Add support for Bonaire Electric Heater HPC5200020 --- .../tuya_local/devices/bonaire_heater.yaml | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 custom_components/tuya_local/devices/bonaire_heater.yaml diff --git a/custom_components/tuya_local/devices/bonaire_heater.yaml b/custom_components/tuya_local/devices/bonaire_heater.yaml new file mode 100644 index 0000000000..c2f11a02c9 --- /dev/null +++ b/custom_components/tuya_local/devices/bonaire_heater.yaml @@ -0,0 +1,119 @@ +name: Bonaire Electric Heater +products: + - id: xto0qf9xem5bi7sj + name: Bonaire Electric Heater HPC5200020 +primary_entity: + entity: climate + translation_only_key: heater + dps: + - id: 1 + name: hvac_mode + type: boolean + mapping: + - dps_val: true + value: "heat" + - dps_val: false + value: "off" + - id: 2 + name: temperature + type: integer + unit: C + range: + min: 5 + max: 35 + - id: 3 + name: current_temperature + type: integer + - id: 4 + name: preset_mode + type: string + mapping: + - dps_val: low + value: eco + - dps_val: high + value: boost + - dps_val: af + value: away + - id: 12 + name: error + type: bitfield + mapping: + - dps_val: 0 + value: "OK" +secondary_entities: + - entity: lock + translation_key: child_lock + category: config + dps: + - id: 7 + type: boolean + name: lock + - entity: light + translation_key: backlight + dps: + - id: 10 + type: boolean + name: switch + - entity: number + translation_key: timer + category: config + dps: + - id: 19 + type: string + name: value + unit: hour + optional: true + range: + min: 0 + max: 24 + mapping: + - dps_val: "cancel" + value: 0 + - dps_val: "1h" + value: 1 + - dps_val: "2h" + value: 2 + - dps_val: "3h" + value: 3 + - dps_val: "4h" + value: 4 + - dps_val: "5h" + value: 5 + - dps_val: "6h" + value: 6 + - dps_val: "7h" + value: 7 + - dps_val: "8h" + value: 8 + - dps_val: "9h" + value: 9 + - dps_val: "10h" + value: 10 + - dps_val: "11h" + value: 11 + - dps_val: "12h" + value: 12 + - dps_val: "13h" + value: 13 + - dps_val: "14h" + value: 14 + - dps_val: "15h" + value: 15 + - dps_val: "16h" + value: 16 + - dps_val: "17h" + value: 17 + - dps_val: "18h" + value: 18 + - dps_val: "19h" + value: 19 + - dps_val: "20h" + value: 20 + - dps_val: "21h" + value: 21 + - dps_val: "22h" + value: 22 + - dps_val: "23h" + value: 23 + - dps_val: "24h" + value: 24 From 5d39a593cdc9b623b8f5dfcaec7773331c0c7357 Mon Sep 17 00:00:00 2001 From: Bo Jeanes Date: Thu, 11 Jul 2024 16:12:38 +1000 Subject: [PATCH 020/169] Change error DPS to a diagnostic problem binary_sensor --- .../tuya_local/devices/bonaire_heater.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/custom_components/tuya_local/devices/bonaire_heater.yaml b/custom_components/tuya_local/devices/bonaire_heater.yaml index c2f11a02c9..ed9df5ea51 100644 --- a/custom_components/tuya_local/devices/bonaire_heater.yaml +++ b/custom_components/tuya_local/devices/bonaire_heater.yaml @@ -34,12 +34,7 @@ primary_entity: value: boost - dps_val: af value: away - - id: 12 - name: error - type: bitfield - mapping: - - dps_val: 0 - value: "OK" + secondary_entities: - entity: lock translation_key: child_lock @@ -48,6 +43,17 @@ secondary_entities: - id: 7 type: boolean name: lock + - entity: binary_sensor + class: problem + category: diagnostic + dps: + - id: 12 + name: error + type: bitfield + mapping: + - dps_val: 0 + value: false + - value: true - entity: light translation_key: backlight dps: From 4e50356a66aaf4f7eec650a4a562a733360b494d Mon Sep 17 00:00:00 2001 From: Bo Jeanes Date: Thu, 11 Jul 2024 16:13:55 +1000 Subject: [PATCH 021/169] Address feedback on naming --- custom_components/tuya_local/devices/bonaire_heater.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/tuya_local/devices/bonaire_heater.yaml b/custom_components/tuya_local/devices/bonaire_heater.yaml index ed9df5ea51..ff432dc69b 100644 --- a/custom_components/tuya_local/devices/bonaire_heater.yaml +++ b/custom_components/tuya_local/devices/bonaire_heater.yaml @@ -1,7 +1,7 @@ -name: Bonaire Electric Heater +name: Electric Heater products: - id: xto0qf9xem5bi7sj - name: Bonaire Electric Heater HPC5200020 + name: Bonaire HPC5200020 primary_entity: entity: climate translation_only_key: heater From 1a0966366a9f9190c00f24fe9e8b8dc702813e8e Mon Sep 17 00:00:00 2001 From: Bo Jeanes Date: Thu, 11 Jul 2024 19:08:56 +1000 Subject: [PATCH 022/169] Make problem sensor more like taurus_agadir_heater Not very sure I understand the CI failure, but making the binary sensor based on fault code more similar to the linked example. --- custom_components/tuya_local/devices/bonaire_heater.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/bonaire_heater.yaml b/custom_components/tuya_local/devices/bonaire_heater.yaml index ff432dc69b..4a547e7ccf 100644 --- a/custom_components/tuya_local/devices/bonaire_heater.yaml +++ b/custom_components/tuya_local/devices/bonaire_heater.yaml @@ -48,12 +48,15 @@ secondary_entities: category: diagnostic dps: - id: 12 - name: error type: bitfield + name: sensor mapping: - dps_val: 0 value: false - value: true + - id: 12 + type: bitfield + name: fault_code - entity: light translation_key: backlight dps: From 8528f3e49eaa4d301bf4ad04eda92d1f4ba451ca Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Fri, 12 Jul 2024 21:05:39 +0900 Subject: [PATCH 023/169] Revert "Entity naming: use device name if translation_key is device class" This reverts commit 065ece9bb3537eba71111ad33f290054cd3bfa80. Issue #1856 This change interferes with sensor naming. I'm not sure why the sensor naming based on class translations is working, but switches are not in #1856 --- custom_components/tuya_local/helpers/mixin.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/custom_components/tuya_local/helpers/mixin.py b/custom_components/tuya_local/helpers/mixin.py index 55c4b972b4..57886f5419 100644 --- a/custom_components/tuya_local/helpers/mixin.py +++ b/custom_components/tuya_local/helpers/mixin.py @@ -55,10 +55,7 @@ def name(self): @property def use_device_name(self): """Return whether to use the device name for the entity name""" - alt_name = self._config.translation_key - if self._config.translation_key is self._config.device_class: - alt_name = None - own_name = self._config.name or alt_name + own_name = self._config.name or self._config.translation_key return not own_name @property From 21d0680c88572b8d68bade2ff56ec6dc0793b69a Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 15 Jul 2024 16:40:08 +0900 Subject: [PATCH 024/169] Docs for recent PRs. PR #2069, #2079 --- ACKNOWLEDGEMENTS.md | 2 ++ DEVICES.md | 1 + 2 files changed, 3 insertions(+) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 2b54f29280..258cbab1f1 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -592,3 +592,5 @@ Further device support has been made with the assistance of users. Please consid - [jorgeal94](https://github.com/jorgeal94) for assisting with support for another Tongou QCB2 circuit breaker variant and compatible Tongou SMR1 circuit breaker. - [ifumadjiev](https://github.com/ifumadjiev) for assisting with support for Gosund SP112 USB smartplug. - [Trychlik](https://github.com/Trychlik) for assisting with support for Tesla S300 air purifier. +- [thewade](https://github.com/thewade) for contributing support for PlantsIO Ivy smart planter. +- [bjeanes](https://github.com/bjeanes) for contributing support for Bonaire HPC5200020 heater. diff --git a/DEVICES.md b/DEVICES.md index 9e0c775e0d..43d5604a9c 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -8,6 +8,7 @@ - Atomi AT1632/AT1635 ceramic heaters - Betterlife BT1500 IR heater - Blumfeldt/Klarstein Cosmic Beam Smart 24 infrared radiant heater +- Bonaire HPC5200020 electric heater - BVF CP1 heater - Caldo Up T fan heater - Calex Smart Convector heater From 1f7541109fdd569ec055cfa377432f5a6a7a9b75 Mon Sep 17 00:00:00 2001 From: Jame Date: Tue, 9 Jul 2024 21:49:07 +1200 Subject: [PATCH 025/169] Added air purifier config --- .../devices/arlec_apr005ha_air_purifier.yaml | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml diff --git a/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml b/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml new file mode 100644 index 0000000000..cd2697dec9 --- /dev/null +++ b/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml @@ -0,0 +1,100 @@ +name: Air Purifier +products: + - id: dfgsetrdnabqeimr + name: Arlec Air Purifier CFR225HA +primary_entity: + entity: fan + translation_only_key: fan_with_presets + dps: + - id: 1 + name: switch + type: boolean + - id: 3 + name: preset_mode + type: string + mapping: + - dps_val: Auto + value: smart + - dps_val: Manual + value: normal + - dps_val: Sleep + value: sleep + - id: 4 + type: integer + name: speed + range: + min: 1 + max: 3 +secondary_entities: + - entity: switch + translation_key: ionizer + category: config + dps: + - id: 6 + type: boolean + name: switch + - entity: switch + translation_key: uv_sterilization + category: config + dps: + - id: 9 + type: boolean + name: switch + - entity: lock + translation_key: child_lock + category: config + dps: + - id: 7 + type: boolean + name: lock + - entity: select + translation_key: timer + category: config + dps: + - id: 18 + type: string + name: option + mapping: + - dps_val: cancel + value: "Off" + - dps_val: 1h + value: 1 hour + - dps_val: 2h + value: 2 hours + - dps_val: 3h + value: 3 hours + - dps_val: 4h + value: 4 hours + - dps_val: 5h + value: 5 hours + - dps_val: 6h + value: 6 hours + - dps_val: 7h + value: 7 hours + - dps_val: 8h + value: 8 hours + - dps_val: 9h + value: 9 hours + - dps_val: 10h + value: 10 hours + - dps_val: 11h + value: 11 hours + - dps_val: 12h + value: 12 hours + - entity: sensor + class: pm25 + dps: + - id: 2 + type: integer + name: sensor + unit: µg/m³ + - entity: sensor + name: Total time + class: duration + category: diagnostic + icon: "mdi:clock-outline" + dps: + - id: 17 + name: sensor + type: integer + unit: hours From 2a959ffc4f9be700edc6a8d46c40349e90956c80 Mon Sep 17 00:00:00 2001 From: Jame Date: Tue, 9 Jul 2024 21:51:39 +1200 Subject: [PATCH 026/169] Added air purifier config --- .../tuya_local/devices/arlec_apr005ha_air_purifier.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml b/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml index cd2697dec9..f775e6f323 100644 --- a/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml +++ b/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml @@ -1,7 +1,7 @@ name: Air Purifier products: - id: dfgsetrdnabqeimr - name: Arlec Air Purifier CFR225HA + name: Arlec Air Purifier APR005HA primary_entity: entity: fan translation_only_key: fan_with_presets From d97caa960d2c78f1c883c211235f637e01c2cda4 Mon Sep 17 00:00:00 2001 From: Jame Date: Tue, 9 Jul 2024 22:00:23 +1200 Subject: [PATCH 027/169] Renamed air quality --- .../tuya_local/devices/arlec_apr005ha_air_purifier.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml b/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml index f775e6f323..2944c133a7 100644 --- a/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml +++ b/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml @@ -82,6 +82,7 @@ secondary_entities: - dps_val: 12h value: 12 hours - entity: sensor + name: Air quality class: pm25 dps: - id: 2 From cebe0d5c6e519fba9822611eaa1ed15cf256d170 Mon Sep 17 00:00:00 2001 From: Jame Date: Mon, 15 Jul 2024 19:35:43 +1200 Subject: [PATCH 028/169] Removed unnecessary names --- .../tuya_local/devices/arlec_apr005ha_air_purifier.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml b/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml index 2944c133a7..20250aa204 100644 --- a/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml +++ b/custom_components/tuya_local/devices/arlec_apr005ha_air_purifier.yaml @@ -82,7 +82,6 @@ secondary_entities: - dps_val: 12h value: 12 hours - entity: sensor - name: Air quality class: pm25 dps: - id: 2 @@ -90,7 +89,6 @@ secondary_entities: name: sensor unit: µg/m³ - entity: sensor - name: Total time class: duration category: diagnostic icon: "mdi:clock-outline" From 03631da14c92d4bdc7b11021b4b662db0e589bd3 Mon Sep 17 00:00:00 2001 From: Jianyun Date: Mon, 15 Jul 2024 18:26:24 +0800 Subject: [PATCH 029/169] Add Simplified Chinese translation --- .../tuya_local/translations/zh-Hans.json | 336 ++++++++++++++++++ 1 file changed, 336 insertions(+) create mode 100644 custom_components/tuya_local/translations/zh-Hans.json diff --git a/custom_components/tuya_local/translations/zh-Hans.json b/custom_components/tuya_local/translations/zh-Hans.json new file mode 100644 index 0000000000..e781e15093 --- /dev/null +++ b/custom_components/tuya_local/translations/zh-Hans.json @@ -0,0 +1,336 @@ +{ + "title": "Tuya Local", + "config": { + "step": { + "user": { + "title": "配置您的Tuya Local设备", + "description": "您可以手动添加设备,或通过Smart Life应用的云服务辅助添加。", + "data": { + "setup_mode": "设置选项:" + } + }, + "cloud": { + "title": "登录Tuya", + "description": "输入您的Smart Life或Tuya Smart用户代码。\n\n您可以在Smart Life或Tuya Smart应用的**设置** > **账户和安全**页面找到此代码,并在**用户代码**字段中输入。用户代码区分大小写,请确保准确输入。", + "data": { + "user_code": "用户代码:" + } + }, + "scan": { + "title": "完成登录", + "description": "使用Smart Life或Tuya Smart应用扫描以下二维码以完成登录。\n\n完成此步骤后,继续进行下一步。" + }, + "choose_device": { + "title": "选择要添加的设备", + "description": "请从下拉列表中选择要添加的设备。已添加的设备不会显示。\n\n如果设备通过网关连接,请从网关列表中选择,否则选择无。", + "data": { + "device_id": "选择设备:", + "hub_id": "选择网关:" + } + }, + "search": { + "title": "定位设备IP地址", + "description": "Tuya云不提供本地IP地址,因此我们现在必须搜索您的本地网络以找到设备。这需要最多20秒。\n\n如果搜索不成功,您需要通过其他方式提供IP地址,例如从路由器的DHCP分配中获取。\n\n为了使这一步骤和后续的设备添加成功,您必须关闭移动应用,否则其连接会阻止Tuya Local与设备的通信。" + }, + "local": { + "title": "配置您的Tuya Local设备", + "description": "[按照这些说明找到您的设备ID和 Local key](https://github.com/make-all/tuya-local#finding-your-device-id-and-local-key)", + "data": { + "host": "IP地址或主机名", + "device_id": "设备ID", + "local_key": "Local key", + "protocol_version": "协议版本(如果不清楚,请选择自动)", + "poll_only": "仅轮询(如果设备无法正常工作,请选择此项)", + "device_cid": "子设备ID(对于通过网关连接的设备)" + } + }, + "select_type": { + "title": "选择设备类型", + "description": "选择与您的设备匹配的类型", + "data": { + "type": "设备类型" + } + }, + "choose_entities": { + "title": "设备详情", + "description": "为此设备选择一个名称", + "data": { + "name": "名称" + } + } + }, + "abort": { + "already_configured": "具有该ID的设备已添加。", + "not_supported": "抱歉,不支持此设备。", + "no_devices": "无法找到该账户的任何未注册设备。" + }, + "error": { + "connection": "无法使用这些详细信息连接到您的设备。这可能是间歇性问题,或信息不正确。", + "does_not_need_hub": "设备不需要网关,但选择了一个。请检查您的选择。", + "needs_hub": "设备需要网关,但未选择。" + } + }, + "selector": { + "setup_mode": { + "options": { + "cloud": "Smart Life云辅助设备设置。", + "manual": "手动提供设备连接信息。" + } + } + }, + "options": { + "step": { + "user": { + "title": "配置您的Tuya Local设备", + "description": "[按照这些说明找到您的 Local key](https://github.com/make-all/tuya-local#finding-your-device-id-and-local-key)", + "data": { + "host": "IP地址或主机名", + "local_key": "Local key", + "protocol_version": "协议版本(如果不清楚,请选择自动)", + "poll_only": "仅轮询(如果设备无法正常工作,请选择此项)", + "device_cid": "子设备ID(对于通过网关连接的设备)" + } + } + }, + "error": { + "connection": "无法使用这些详细信息连接到您的设备。这可能是间歇性问题,或信息不正确。" + }, + "abort": { + "not_supported": "抱歉,不支持此设备。" + } + }, + "entity": { + "binary_sensor": { + "defrost": { + "name": "除霜", + "state": { + "off": "正常", + "on": "除霜中" + } + }, + "tank_empty": { + "name": "水箱", + "state": { + "off": "正常", + "on": "缺水" + } + }, + "tank_full": { + "name": "水箱", + "state": { + "off": "正常", + "on": "满水" + } + } + }, + "climate": { + "aircon_extra": { + "state_attributes": { + "fan_mode": { + "state": { + "health": "健康", + "medhigh": "中高", + "medlow": "中低", + "natural": "自然", + "quiet": "安静", + "sleep": "睡眠", + "strong": "强力" + } + }, + "swing_mode": { + "state": { + "topmost": "最高", + "top": "高", + "middle": "中", + "down": "低", + "downmost": "最低" + } + } + } + }, + "thermostat": { + "state_attributes": { + "fan_mode": { + "state": { + "cycle": "循环" + } + }, + "preset_mode": { + "state": { + "manual": "手动", + "program": "程序", + "temp_override": "临时覆盖", + "perm_override": "永久覆盖" + } + } + } + }, + "combo_floor": { + "state_attributes": { + "preset_mode": { + "state": { + "cool": "冷风", + "fan_only": "风扇", + "heat": "热风", + "floor_cool": "冷地板", + "floor_heat": "热地板" + } + } + } + }, + "swing_as_powerlevel": { + "state_attributes": { + "swing_mode": { + "name": "加热水平", + "state": { + "stop": "停止", + "auto": "自动" + } + } + } + }, + "pool_heatpump": { + "state_attributes": { + "preset_mode": { + "state": { + "smart_heat": "智能加热", + "quick_heat": "快速加热", + "quiet_heat": "安静加热", + "smart_cool": "智能冷却", + "quick_cool": "快速冷却", + "quiet_cool": "安静冷却", + "auto": "自动" + } + } + } + }, + "heater": { + "name": "加热器" + }, + "thermo_switch": { + "state_attributes": { + "hvac_mode": { + "state": { + "fan_only": "暂停" + } + } + } + } + }, + "humidifier": { + "dehumidifier": { + "state_attributes": { + "mode": { + "state": { + "laundry": "烘干衣物", + "purify": "净化" + } + } + } + } + }, + "fan": { + "fan_with_presets": { + "state_attributes": { + "preset_mode": { + "state": { + "baby": "婴儿", + "fresh": "清新", + "nature": "自然", + "normal": "正常", + "sleep": "睡眠", + "smart": "智能", + "strong": "强劲", + "displayoff": "关闭显示", + "off": "关闭" + } + } + } + }, + "ventilation": { + "state_attributes": { + "preset_mode": { + "state": { + "fresh": "新风", + "circulate": "循环", + "sleep": "睡眠", + "auto": "自动", + "eco": "节能", + "anti-condensation": "防凝结" + } + } + } + } + }, + "light": { + "backlight": { + "name": "背光" + }, + "display": { + "name": "显示" + }, + "embers": { + "name": "余烬" + }, + "flame": { + "name": "火焰" + }, + "indicator": { + "name": "指示灯" + }, + "laser": { + "name": "激光" + }, + "logs": { + "name": "日志" + }, + "nightlight": { + "name": "夜灯" + } + }, + "lock": { + "child_lock": { + "name": "儿童锁" + } + }, + "number": { + "timer": { + "name": "计时器" + } + }, + "select": { + "timer": { + "name": "计时器" + }, + "temperature_unit": { + "name": "温度单位", + "state": { + "celsius": "摄氏度", + "fahrenheit": "华氏度" + } + } + }, + "sensor": { + "time_remaining": { + "name": "剩余时间" + } + }, + "switch": { + "anti_frost": { + "name": "防冻" + }, + "evaporator_cleaning": { + "name": "蒸发器清洁" + }, + "ionizer": { + "name": "离子发生器" + }, + "keytone": { + "name": "按键音" + }, + "uv_sterilization": { + "name": "紫外线消毒" + } + } + } +} From 47d63fc6758a71c4b8abac69cb0fbb2a5cad9fef Mon Sep 17 00:00:00 2001 From: Jianyun Date: Mon, 15 Jul 2024 18:30:19 +0800 Subject: [PATCH 030/169] Update Simplified Chinese translation --- custom_components/tuya_local/translations/zh-Hans.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/translations/zh-Hans.json b/custom_components/tuya_local/translations/zh-Hans.json index e781e15093..5905d5e69c 100644 --- a/custom_components/tuya_local/translations/zh-Hans.json +++ b/custom_components/tuya_local/translations/zh-Hans.json @@ -60,7 +60,7 @@ } }, "abort": { - "already_configured": "具有该ID的设备已添加。", + "already_configured": "该ID的设备已添加。", "not_supported": "抱歉,不支持此设备。", "no_devices": "无法找到该账户的任何未注册设备。" }, From 5531476630aea43ac027603f4fe298a9ca40bad4 Mon Sep 17 00:00:00 2001 From: Jianyun Date: Tue, 9 Jul 2024 18:18:46 +0800 Subject: [PATCH 031/169] feat: Add support for Casdon TD Pro 2 device --- .../tuya_local/devices/casdon_td_pro_2.yaml | 193 ++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 custom_components/tuya_local/devices/casdon_td_pro_2.yaml diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml new file mode 100644 index 0000000000..231143ded9 --- /dev/null +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -0,0 +1,193 @@ +name: Casdon TD Pro 2 +products: + - id: wab6oustdukujpkn + name: 蒸烤箱TD-pro二代 +primary_entity: + entity: switch + icon: "mdi:power" + name: Switch + dps: + - id: 1 + type: boolean + name: switch + +secondary_entities: + - entity: switch + name: Start + icon: "mdi:play-pause" + dps: + - id: 2 + name: switch + type: boolean + - entity: number + name: cook_temperature + dps: + - id: 7 + name: value + type: integer + unit: C + range: + min: 0 + max: 500 + - entity: sensor + name: temp_current + class: temperature + dps: + - id: 8 + name: sensor + type: integer + unit: C + readonly: true + range: + min: 0 + max: 500 + - entity: number + name: appointment_time + dps: + - id: 9 + name: value + type: integer + optional: true + range: + min: 0 + max: 1440 + unit: min + class: measurement + - entity: number + icon: "mdi:timer-edit" + name: cook_time + dps: + - id: 10 + name: value + type: integer + range: + min: 0 + max: 1440 + unit: min + class: measurement + - entity: sensor + icon: "mdi:timer" + name: remain_time + dps: + - id: 11 + name: sensor + type: integer + readonly: true + range: + min: 0 + max: 1440 + unit: min + class: measurement + - entity: binary_sensor + name: fault + category: diagnostic + dps: + - id: 13 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: OK + - dps_val: 1 + value: "er1:腔体高温保护(腔体传感器温度高于290°C)" + - dps_val: 2 + value: "er2:蒸发盘高温保护(蒸发盘传感器温度高于200°C)" + - dps_val: 4 + value: "er3:腔体低温保护(连续工作5分钟温度低于35°C)" + - dps_val: 8 + value: "er4:蒸发盘低温保护(连续工作5分钟温度低于35°C)" + - dps_val: 16 + value: "er5:传感器连接出故障(腔体或蒸发盘传感器开路)" + - dps_val: 32 + value: "er6:传感器感应出故障(腔体或蒸发盘传感器短路)" + - dps_val: 64 + value: "er7:显示板通信故障" + - dps_val: 128 + value: "er8:水箱开关(CN7)未闭合或者蒸发盘NTC(CN3)温度高于125℃并持续时间达25s后,缺水提示,并停止工作。" + - entity: sensor + name: cook_status + class: enum + dps: + - id: 102 + name: sensor + type: string + readonly: true + mapping: + - dps_val: wait + value: 烹饪等待 + - dps_val: reservation + icon: "mdi:cup-water" + value: 预约中 + - dps_val: cooking + icon: "mdi:cup" + value: 烹饪中 + - dps_val: cancel + icon: "mdi:cup" + value: 烹饪取消 + - dps_val: done + icon: "mdi:cup" + value: 烹饪完成 + - dps_val: pause + icon: "mdi:cup" + value: 烹饪暂停 + - entity: switch + name: Lamp + icon: "mdi:lightbulb-on" + dps: + - id: 103 + name: switch + type: boolean + - entity: select + name: all_mode + category: config + dps: + - id: 105 + name: option + type: string + mapping: + - dps_val: "1" + value: 健康蒸 + - dps_val: "2" + value: 鲜嫩蒸 + - dps_val: "3" + value: 高温蒸 + - dps_val: "4" + value: 养生炖 + - dps_val: "5" + value: 上下烤 + - dps_val: "6" + value: 立体烧烤 + - dps_val: "7" + value: 底部热风 + - dps_val: "8" + value: 上强烤 + - dps_val: "9" + value: 3D热风 + - dps_val: "10" + value: 空气炸 + - dps_val: "11" + value: 蒸汽炸 + - dps_val: "12" + value: 一键面包 + - dps_val: "13" + value: 速热 + - dps_val: "14" + value: 保温 + - dps_val: "15" + value: 解冻 + - dps_val: "16" + value: 发酵 + - dps_val: "17" + value: 除垢 + - dps_val: "18" + value: 菜谱模式 + - dps_val: "19" + value: 内腔烘干 + - dps_val: "20" + value: 自定义模式 + - dps_val: "21" + value: 低湿蒸烤 + - dps_val: "22" + value: 中湿蒸烤 + - dps_val: "23" + value: 高湿蒸烤 From 29dd0ed543d06b52b6459d801176ab4664e5c505 Mon Sep 17 00:00:00 2001 From: Jianyun Date: Wed, 10 Jul 2024 16:12:39 +0800 Subject: [PATCH 032/169] Update casdon_td_pro_2.yaml --- .../tuya_local/devices/casdon_td_pro_2.yaml | 92 +++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index 231143ded9..b9aea89dfd 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -145,49 +145,49 @@ secondary_entities: name: option type: string mapping: - - dps_val: "1" - value: 健康蒸 - - dps_val: "2" - value: 鲜嫩蒸 - - dps_val: "3" - value: 高温蒸 - - dps_val: "4" - value: 养生炖 - - dps_val: "5" - value: 上下烤 - - dps_val: "6" - value: 立体烧烤 - - dps_val: "7" - value: 底部热风 - - dps_val: "8" - value: 上强烤 - - dps_val: "9" - value: 3D热风 - - dps_val: "10" - value: 空气炸 - - dps_val: "11" - value: 蒸汽炸 - - dps_val: "12" - value: 一键面包 - - dps_val: "13" - value: 速热 - - dps_val: "14" - value: 保温 - - dps_val: "15" - value: 解冻 - - dps_val: "16" - value: 发酵 - - dps_val: "17" - value: 除垢 - - dps_val: "18" - value: 菜谱模式 - - dps_val: "19" - value: 内腔烘干 - - dps_val: "20" - value: 自定义模式 - - dps_val: "21" - value: 低湿蒸烤 - - dps_val: "22" - value: 中湿蒸烤 - - dps_val: "23" - value: 高湿蒸烤 + - dps_val: "1" + value: 健康蒸 + - dps_val: "2" + value: 鲜嫩蒸 + - dps_val: "3" + value: 高温蒸 + - dps_val: "4" + value: 养生炖 + - dps_val: "5" + value: 上下烤 + - dps_val: "6" + value: 立体烧烤 + - dps_val: "7" + value: 底部热风 + - dps_val: "8" + value: 上强烤 + - dps_val: "9" + value: 3D热风 + - dps_val: "10" + value: 空气炸 + - dps_val: "11" + value: 蒸汽炸 + - dps_val: "12" + value: 一键面包 + - dps_val: "13" + value: 速热 + - dps_val: "14" + value: 保温 + - dps_val: "15" + value: 解冻 + - dps_val: "16" + value: 发酵 + - dps_val: "17" + value: 除垢 + - dps_val: "18" + value: 菜谱模式 + - dps_val: "19" + value: 内腔烘干 + - dps_val: "20" + value: 自定义模式 + - dps_val: "21" + value: 低湿蒸烤 + - dps_val: "22" + value: 中湿蒸烤 + - dps_val: "23" + value: 高湿蒸烤 From b78559b035a227e7a4cf8b9cd2f4f607714df8b5 Mon Sep 17 00:00:00 2001 From: Jianyun Date: Wed, 10 Jul 2024 16:24:47 +0800 Subject: [PATCH 033/169] feat: Update casdon_td_pro_2.yaml to include fault_message sensor and fix fault binary_sensor --- .../tuya_local/devices/casdon_td_pro_2.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index b9aea89dfd..6efa5064e2 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -78,8 +78,8 @@ secondary_entities: max: 1440 unit: min class: measurement - - entity: binary_sensor - name: fault + - entity: sensor + name: fault_message category: diagnostic dps: - id: 13 @@ -104,6 +104,17 @@ secondary_entities: value: "er7:显示板通信故障" - dps_val: 128 value: "er8:水箱开关(CN7)未闭合或者蒸发盘NTC(CN3)温度高于125℃并持续时间达25s后,缺水提示,并停止工作。" + - entity: binary_sensor + name: fault + category: diagnostic + dps: + - id: 13 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true - entity: sensor name: cook_status class: enum From 1d4618b88bf0effbb2aa57c3c7a43967a83caa06 Mon Sep 17 00:00:00 2001 From: Jianyun Date: Thu, 11 Jul 2024 09:08:05 +0800 Subject: [PATCH 034/169] feat: Add enum class for fault_message sensor in casdon_td_pro_2.yaml --- custom_components/tuya_local/devices/casdon_td_pro_2.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index 6efa5064e2..482b167157 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -81,11 +81,13 @@ secondary_entities: - entity: sensor name: fault_message category: diagnostic + class: enum dps: - id: 13 type: bitfield name: sensor mapping: + - value: OK - dps_val: 0 value: OK - dps_val: 1 From 6025e8bbd112bd97ac6329dfe6c6398cf41b2999 Mon Sep 17 00:00:00 2001 From: Jianyun Date: Mon, 15 Jul 2024 17:09:46 +0800 Subject: [PATCH 035/169] casdon_td_pro_2: Use climate management equipment, sensor changes --- .../tuya_local/devices/casdon_td_pro_2.yaml | 222 +++++++++--------- 1 file changed, 112 insertions(+), 110 deletions(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index 482b167157..73dd5df36c 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -1,15 +1,101 @@ -name: Casdon TD Pro 2 +name: Oven products: - id: wab6oustdukujpkn - name: 蒸烤箱TD-pro二代 + name: Casdon TD Pro 2 primary_entity: - entity: switch - icon: "mdi:power" - name: Switch + entity: climate dps: - id: 1 + name: hvac_mode type: boolean - name: switch + mapping: + - dps_val: true + value: "heat" + - dps_val: false + value: "off" + - id: 7 + name: temperature + type: integer + unit: C + range: + min: 0 + max: 500 + mapping: + - step: 5 + - id: 8 + name: current_temperature + type: integer + - id: 105 + name: preset_mode + type: string + mapping: + - dps_val: "1" + value: 健康蒸 + - dps_val: "2" + value: 鲜嫩蒸 + - dps_val: "3" + value: 高温蒸 + - dps_val: "4" + value: 养生炖 + - dps_val: "5" + value: 上下烤 + - dps_val: "6" + value: 立体烧烤 + - dps_val: "7" + value: 底部热风 + - dps_val: "8" + value: 上强烤 + - dps_val: "9" + value: 3D热风 + - dps_val: "10" + value: 空气炸 + - dps_val: "11" + value: 蒸汽炸 + - dps_val: "12" + value: 一键面包 + - dps_val: "13" + value: 速热 + - dps_val: "14" + value: 保温 + - dps_val: "15" + value: 解冻 + - dps_val: "16" + value: 发酵 + - dps_val: "17" + value: 除垢 + - dps_val: "18" + value: 菜谱模式 + - dps_val: "19" + value: 内腔烘干 + - dps_val: "20" + value: 自定义模式 + - dps_val: "21" + value: 低湿蒸烤 + - dps_val: "22" + value: 中湿蒸烤 + - dps_val: "23" + value: 高湿蒸烤 + - id: 102 + type: string + name: hvac_action + mapping: + - dps_val: cooking + value: heating + - dps_val: reservation + value: idle + - dps_val: cancel + value: idle + - dps_val: done + value: idle + - dps_val: pause + value: idle + - dps_val: "wait" + constraint: hvac_mode + conditions: + - dps_val: true + value: idle + - dps_val: false + value: "off" secondary_entities: - entity: switch @@ -20,54 +106,33 @@ secondary_entities: name: switch type: boolean - entity: number - name: cook_temperature - dps: - - id: 7 - name: value - type: integer - unit: C - range: - min: 0 - max: 500 - - entity: sensor - name: temp_current - class: temperature - dps: - - id: 8 - name: sensor - type: integer - unit: C - readonly: true - range: - min: 0 - max: 500 - - entity: number - name: appointment_time + name: Start time + translation_key: timer dps: - id: 9 name: value type: integer optional: true range: - min: 0 + min: 1 max: 1440 unit: min class: measurement - entity: number icon: "mdi:timer-edit" - name: cook_time + name: Cooking time dps: - id: 10 name: value type: integer range: - min: 0 + min: 1 max: 1440 unit: min class: measurement - entity: sensor - icon: "mdi:timer" - name: remain_time + translation_key: time_remaining + class: duration dps: - id: 11 name: sensor @@ -78,14 +143,20 @@ secondary_entities: max: 1440 unit: min class: measurement - - entity: sensor - name: fault_message + - entity: binary_sensor category: diagnostic - class: enum + class: problem dps: - id: 13 type: bitfield name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - id: 13 + type: bitfield + name: fault_message mapping: - value: OK - dps_val: 0 @@ -106,19 +177,9 @@ secondary_entities: value: "er7:显示板通信故障" - dps_val: 128 value: "er8:水箱开关(CN7)未闭合或者蒸发盘NTC(CN3)温度高于125℃并持续时间达25s后,缺水提示,并停止工作。" - - entity: binary_sensor - name: fault - category: diagnostic - dps: - - id: 13 - type: bitfield - name: sensor - mapping: - - dps_val: 0 - value: false - - value: true + - entity: sensor - name: cook_status + name: Status class: enum dps: - id: 102 @@ -129,78 +190,19 @@ secondary_entities: - dps_val: wait value: 烹饪等待 - dps_val: reservation - icon: "mdi:cup-water" value: 预约中 - dps_val: cooking - icon: "mdi:cup" value: 烹饪中 - dps_val: cancel - icon: "mdi:cup" value: 烹饪取消 - dps_val: done - icon: "mdi:cup" value: 烹饪完成 - dps_val: pause - icon: "mdi:cup" value: 烹饪暂停 - - entity: switch - name: Lamp + - entity: light icon: "mdi:lightbulb-on" dps: - id: 103 name: switch type: boolean - - entity: select - name: all_mode - category: config - dps: - - id: 105 - name: option - type: string - mapping: - - dps_val: "1" - value: 健康蒸 - - dps_val: "2" - value: 鲜嫩蒸 - - dps_val: "3" - value: 高温蒸 - - dps_val: "4" - value: 养生炖 - - dps_val: "5" - value: 上下烤 - - dps_val: "6" - value: 立体烧烤 - - dps_val: "7" - value: 底部热风 - - dps_val: "8" - value: 上强烤 - - dps_val: "9" - value: 3D热风 - - dps_val: "10" - value: 空气炸 - - dps_val: "11" - value: 蒸汽炸 - - dps_val: "12" - value: 一键面包 - - dps_val: "13" - value: 速热 - - dps_val: "14" - value: 保温 - - dps_val: "15" - value: 解冻 - - dps_val: "16" - value: 发酵 - - dps_val: "17" - value: 除垢 - - dps_val: "18" - value: 菜谱模式 - - dps_val: "19" - value: 内腔烘干 - - dps_val: "20" - value: 自定义模式 - - dps_val: "21" - value: 低湿蒸烤 - - dps_val: "22" - value: 中湿蒸烤 - - dps_val: "23" - value: 高湿蒸烤 + From 5c8fffead95218df37b356cc40087d326db471be Mon Sep 17 00:00:00 2001 From: Jianyun Date: Mon, 15 Jul 2024 17:33:54 +0800 Subject: [PATCH 036/169] feat: Update casdon_td_pro_2.yaml to include English translations for cooking modes fault_message Status --- .../tuya_local/devices/casdon_td_pro_2.yaml | 74 +++++++++---------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index 73dd5df36c..4eef212299 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -30,51 +30,51 @@ primary_entity: type: string mapping: - dps_val: "1" - value: 健康蒸 + value: Healthy Steam - dps_val: "2" - value: 鲜嫩蒸 + value: Fresh Steam - dps_val: "3" - value: 高温蒸 + value: High Temp Steam - dps_val: "4" - value: 养生炖 + value: Stew - dps_val: "5" - value: 上下烤 + value: Bake up and down - dps_val: "6" - value: 立体烧烤 + value: BBQ - dps_val: "7" - value: 底部热风 + value: Bottom Hot Air - dps_val: "8" - value: 上强烤 + value: On Strong Roast - dps_val: "9" - value: 3D热风 + value: 3D Hot Air - dps_val: "10" - value: 空气炸 + value: Air Fry - dps_val: "11" - value: 蒸汽炸 + value: Steam Frying - dps_val: "12" - value: 一键面包 + value: One-click Bread - dps_val: "13" - value: 速热 + value: Quick Heat - dps_val: "14" - value: 保温 + value: Keep Warm - dps_val: "15" - value: 解冻 + value: Unfreeze - dps_val: "16" - value: 发酵 + value: Fermentation - dps_val: "17" - value: 除垢 + value: Descale - dps_val: "18" - value: 菜谱模式 + value: Local Recipes - dps_val: "19" - value: 内腔烘干 + value: Drying - dps_val: "20" - value: 自定义模式 + value: Custom - dps_val: "21" - value: 低湿蒸烤 + value: Low Steaming - dps_val: "22" - value: 中湿蒸烤 + value: Medium Steaming - dps_val: "23" - value: 高湿蒸烤 + value: High Steaming - id: 102 type: string name: hvac_action @@ -162,21 +162,21 @@ secondary_entities: - dps_val: 0 value: OK - dps_val: 1 - value: "er1:腔体高温保护(腔体传感器温度高于290°C)" + value: "er1: Chamber Overheat Protection (Sensor temperature exceeds 290°C)" - dps_val: 2 - value: "er2:蒸发盘高温保护(蒸发盘传感器温度高于200°C)" + value: "er2: Evaporation Tray Overheat Protection (Sensor temperature exceeds 200°C)" - dps_val: 4 - value: "er3:腔体低温保护(连续工作5分钟温度低于35°C)" + value: "er3: Chamber Low Temperature Protection (Temperature remains below 35°C for 5 minutes)" - dps_val: 8 - value: "er4:蒸发盘低温保护(连续工作5分钟温度低于35°C)" + value: "er4: Evaporation Tray Low Temperature Protection (Temperature remains below 35°C for 5 minutes)" - dps_val: 16 - value: "er5:传感器连接出故障(腔体或蒸发盘传感器开路)" + value: "er5: Sensor Connection Error (Open circuit in chamber or evaporation tray sensor)" - dps_val: 32 - value: "er6:传感器感应出故障(腔体或蒸发盘传感器短路)" + value: "er6: Sensor Malfunction (Short circuit in chamber or evaporation tray sensor)" - dps_val: 64 - value: "er7:显示板通信故障" + value: "er7: Display Board Communication Error" - dps_val: 128 - value: "er8:水箱开关(CN7)未闭合或者蒸发盘NTC(CN3)温度高于125℃并持续时间达25s后,缺水提示,并停止工作。" + value: "er8: Water Tank Switch (CN7) Not Closed or Evaporation Tray NTC (CN3) Exceeds 125°C for 25 Seconds, Triggering Water Shortage Alert and Stopping Operation" - entity: sensor name: Status @@ -188,17 +188,17 @@ secondary_entities: readonly: true mapping: - dps_val: wait - value: 烹饪等待 + value: Waiting for Cooking - dps_val: reservation - value: 预约中 + value: In Reservation - dps_val: cooking - value: 烹饪中 + value: In Progress - dps_val: cancel - value: 烹饪取消 + value: Cooking Canceled - dps_val: done - value: 烹饪完成 + value: Cooking Completed - dps_val: pause - value: 烹饪暂停 + value: Cooking Paused - entity: light icon: "mdi:lightbulb-on" dps: From d8334edaaa200454cf55a2217d3c837c1d1d1986 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 15 Jul 2024 18:39:25 +0900 Subject: [PATCH 037/169] Casdon TD Pro 2: lint fix, icon removal - remove extra blank line at end of file - remove redundant light icon --- custom_components/tuya_local/devices/casdon_td_pro_2.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index 4eef212299..bb65f309db 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -200,9 +200,7 @@ secondary_entities: - dps_val: pause value: Cooking Paused - entity: light - icon: "mdi:lightbulb-on" dps: - id: 103 name: switch type: boolean - From 1b0b1579fa31f617c1d395382b09dff1b67aaa25 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 15 Jul 2024 18:48:37 +0900 Subject: [PATCH 038/169] Casdon TD Pro 2: abbreviate error messages YAML lint does not like the long lines. Shorter messages are just as understandable. --- .../tuya_local/devices/casdon_td_pro_2.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index bb65f309db..ede96e8175 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -162,21 +162,21 @@ secondary_entities: - dps_val: 0 value: OK - dps_val: 1 - value: "er1: Chamber Overheat Protection (Sensor temperature exceeds 290°C)" + value: "E1: Chamber overheat protection (exceeds 290°C)" - dps_val: 2 - value: "er2: Evaporation Tray Overheat Protection (Sensor temperature exceeds 200°C)" + value: "E2: Evaporation tray overheat protection (exceeds 200°C)" - dps_val: 4 - value: "er3: Chamber Low Temperature Protection (Temperature remains below 35°C for 5 minutes)" + value: "E3: Chamber low temperature protection (below 35°C for 5 minutes)" - dps_val: 8 - value: "er4: Evaporation Tray Low Temperature Protection (Temperature remains below 35°C for 5 minutes)" + value: "E4: Evaporation tray low temperature protection (below 35°C for 5 minutes)" - dps_val: 16 - value: "er5: Sensor Connection Error (Open circuit in chamber or evaporation tray sensor)" + value: "E5: Sensor connection error (Open circuit)" - dps_val: 32 - value: "er6: Sensor Malfunction (Short circuit in chamber or evaporation tray sensor)" + value: "E6: Sensor malfunction (Short circuit)" - dps_val: 64 - value: "er7: Display Board Communication Error" + value: "E7: Display board communication error" - dps_val: 128 - value: "er8: Water Tank Switch (CN7) Not Closed or Evaporation Tray NTC (CN3) Exceeds 125°C for 25 Seconds, Triggering Water Shortage Alert and Stopping Operation" + value: "E8: Water tank open (CN7) or Evaporation tray dry (CN3)" - entity: sensor name: Status From b81908486a14b851af117ae7f93a9411d2d50aff Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 15 Jul 2024 19:30:11 +0900 Subject: [PATCH 039/169] Casdon TD Pro 2: abbreviate error messages some more Two messages were still too long for yamllint, so reduced further. --- custom_components/tuya_local/devices/casdon_td_pro_2.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index ede96e8175..3805860ed3 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -166,9 +166,9 @@ secondary_entities: - dps_val: 2 value: "E2: Evaporation tray overheat protection (exceeds 200°C)" - dps_val: 4 - value: "E3: Chamber low temperature protection (below 35°C for 5 minutes)" + value: "E3: Chamber low temperature protection (below 35°C)" - dps_val: 8 - value: "E4: Evaporation tray low temperature protection (below 35°C for 5 minutes)" + value: "E4: Evaporation tray low temperature protection (below 35°C)" - dps_val: 16 value: "E5: Sensor connection error (Open circuit)" - dps_val: 32 From 146e4e058af096b57e63ec03d1440c8e6df8d790 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 15 Jul 2024 19:44:06 +0900 Subject: [PATCH 040/169] Casdon TD Pro 2: final shortening of error message --- custom_components/tuya_local/devices/casdon_td_pro_2.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index 3805860ed3..8470ea05bb 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -168,7 +168,7 @@ secondary_entities: - dps_val: 4 value: "E3: Chamber low temperature protection (below 35°C)" - dps_val: 8 - value: "E4: Evaporation tray low temperature protection (below 35°C)" + value: "E4: Evaporation tray low temp protection (below 35°C)" - dps_val: 16 value: "E5: Sensor connection error (Open circuit)" - dps_val: 32 From 524c6f1900617bbf947bd8b9b0026002c7bf2c04 Mon Sep 17 00:00:00 2001 From: Arjan Lankhaar Date: Mon, 8 Jul 2024 22:27:20 +0200 Subject: [PATCH 041/169] Added support for the Zedar R600 robot vacuum --- DEVICES.md | 1 + .../tuya_local/devices/zedar_r600_vacuum.yaml | 352 ++++++++++++++++++ 2 files changed, 353 insertions(+) create mode 100644 custom_components/tuya_local/devices/zedar_r600_vacuum.yaml diff --git a/DEVICES.md b/DEVICES.md index 43d5604a9c..37b26bc31c 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -594,6 +594,7 @@ of device. - Tesvor S6 vacuum cleaner with mop - TTEC Robi Pro vacuum cleaner - Ultenic T10 vacuum cleaner +- Zedar R600 ### Lawnmowers diff --git a/custom_components/tuya_local/devices/zedar_r600_vacuum.yaml b/custom_components/tuya_local/devices/zedar_r600_vacuum.yaml new file mode 100644 index 0000000000..db2c017936 --- /dev/null +++ b/custom_components/tuya_local/devices/zedar_r600_vacuum.yaml @@ -0,0 +1,352 @@ +name: Robot vacuum +products: + - id: yiarxtixzkmnegxk + name: Zedar R600 +primary_entity: + entity: vacuum + dps: + - id: 1 + type: boolean + optional: true + name: activate + mapping: + - dps_val: false + constraint: pause + conditions: + - dps_val: true + value: false + - dps_val: false + value: false + hidden: true + - dps_val: null + value: false + hidden: true + - dps_val: true + constraint: pause + conditions: + - dps_val: false + value: true + - dps_val: true + value: true + hidden: true + - dps_val: null + value: true + hidden: true + - dps_val: null + value: false + hidden: true + - id: 2 + type: boolean + optional: true + name: pause + - id: 3 + name: return_to_base + type: boolean + optional: true + - id: 4 + type: string + name: command + mapping: + - dps_val: smart + value: smart + - dps_val: chargego + value: return_to_base + - dps_val: zone + value: zone + - dps_val: pose + value: go_to_position + - dps_val: selectroom + value: room + - id: 5 + type: string + name: status + mapping: + - dps_val: standby + value: standby + - dps_val: smart + value: cleaning + - dps_val: smart_clean + value: cleaning + - dps_val: zone_clean + value: cleaning + - dps_val: part_clean + value: cleaning + - dps_val: cleaning + value: cleaning + - dps_val: paused + value: paused + - dps_val: goto_pos + value: going_to_location + - dps_val: pos_arrived + value: on_location + - dps_val: pos_unarrive + value: cannot_find_location + - dps_val: goto_charge + value: returning + - dps_val: charging + value: charging + - dps_val: charge_done + value: charged + - dps_val: sleep + value: sleep + - dps_val: select_room + value: select_room + - dps_val: wall_follow + value: wall_follow + - dps_val: direction_control + value: direction_control + - id: 9 + type: string + name: fan_speed + mapping: + - dps_val: turnoff + value: "Off" + - dps_val: gentle + value: Low + - dps_val: normal + value: Medium + - dps_val: strong + value: High + - id: 11 + type: boolean + optional: true + name: locate + - id: 12 + type: string + optional: true + name: direction_control + mapping: + - dps_val: forward + value: forward + - dps_val: backward + value: reverse + - dps_val: turn_left + value: left + - dps_val: turn_right + value: right + - dps_val: stop + value: stop + - id: 14 + type: string + optional: true + name: path_data + - id: 15 + type: base64 + optional: true + name: complex_command + - id: 16 + type: string + optional: true + name: request + mapping: + - dps_val: get_map + value: Get map + - dps_val: get_path + value: Get path + - dps_val: get_both + value: Get both + - id: 28 + type: bitfield + name: error + mapping: + - dps_val: 2 + value: left_wheel_hang + - dps_val: 4 + value: main_brush_stuck + - dps_val: 8 + value: right_wheel_hang + - dps_val: 16 + value: left_wheel_stuck + - dps_val: 32 + value: right_wheel_stuck + - dps_val: 64 + value: cliff + - dps_val: 128 + value: side_brush_stuck + - dps_val: 512 + value: collision + - dps_val: 1024 + value: dust_box_stuck + - dps_val: 4096 + value: ground_check_failure + - dps_val: 32768 + value: vacuum_motor_stuck + - dps_val: 65536 + value: high_current + - dps_val: 131072 + value: charge_port_closed + - id: 32 + type: string + optional: true + name: device_timer + - id: 33 + type: string + optional: true + name: disturb_time_set + - id: 34 + type: string + optional: true + name: device_info + - id: 35 + type: string + optional: true + name: voice_data + - id: 36 + name: language + type: string + optional: true +secondary_entities: + - entity: sensor + name: Cleaning time + class: duration + category: diagnostic + dps: + - id: 6 + type: integer + name: sensor + unit: min + class: measurement + - entity: sensor + name: Cleaned area + category: diagnostic + icon: "mdi:floor-plan" + dps: + - id: 7 + type: integer + name: sensor + unit: m2 + - entity: sensor + class: battery + dps: + - id: 8 + type: integer + name: sensor + unit: "%" + class: measurement + - entity: select + name: Mopping + icon: "mdi:cup-water" + category: config + dps: + - id: 10 + type: string + name: option + optional: true + mapping: + - dps_val: closed + value: "Off" + - dps_val: low + value: Low + - dps_val: middle + value: Medium + - dps_val: high + value: High + - dps_val: null + value: "Off" + hidden: true + - entity: button + name: Reset map + category: config + dps: + - id: 13 + type: boolean + name: button + optional: true + - entity: sensor + name: Edge brush life + class: duration + category: diagnostic + dps: + - id: 17 + type: integer + name: sensor + unit: min + - entity: button + name: Edge brush reset + class: restart + category: config + dps: + - id: 18 + type: boolean + name: button + optional: true + - entity: sensor + name: Roll brush life + class: duration + category: diagnostic + dps: + - id: 19 + type: integer + name: sensor + unit: min + - entity: button + name: Roll brush reset + class: restart + category: config + dps: + - id: 20 + type: boolean + name: button + optional: true + - entity: sensor + name: Filter life + class: duration + category: diagnostic + dps: + - id: 21 + type: integer + name: sensor + unit: min + - entity: button + name: Filter reset + class: restart + category: config + dps: + - id: 22 + type: boolean + name: button + optional: true + - entity: sensor + name: Mop life + class: duration + category: diagnostic + dps: + - id: 23 + type: integer + name: sensor + unit: min + - entity: button + name: Mop reset + class: restart + category: config + dps: + - id: 24 + type: boolean + name: button + optional: true + - entity: switch + name: Do not disturb + category: config + dps: + - id: 25 + type: boolean + name: switch + optional: true + mapping: + - dps_val: null + value: false + hidden: true + - entity: number + name: Volume + category: config + icon: "mdi:volume-high" + dps: + - id: 26 + type: integer + name: value + range: + min: 0 + max: 10 + unit: "%" + mapping: + - scale: 0.1 From 16172e204da5fc0e10b43911daf314a8f21717f5 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 15 Jul 2024 20:56:53 +0900 Subject: [PATCH 042/169] Goodcell EV charger: add optional dp 120. From PR #2106, this appears to be a charging session duration, but is a string, so not directly useful as a sensor. --- custom_components/tuya_local/devices/goodcell_ev_charger.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/custom_components/tuya_local/devices/goodcell_ev_charger.yaml b/custom_components/tuya_local/devices/goodcell_ev_charger.yaml index c2a7f7d9c5..52f9107d33 100644 --- a/custom_components/tuya_local/devices/goodcell_ev_charger.yaml +++ b/custom_components/tuya_local/devices/goodcell_ev_charger.yaml @@ -262,6 +262,10 @@ secondary_entities: range: min: 0 max: 15 + - id: 120 + type: string + optional: true + name: session_duration - entity: select name: Toggle charging icon: "mdi:ev-plug-type2" From 1f5ecff3f3f9cf9491b4e9d1b15d687239660a0c Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 15 Jul 2024 21:16:19 +0900 Subject: [PATCH 043/169] Docs for recent merged PRs PR #2092, #2094, #2098, #2113 --- ACKNOWLEDGEMENTS.md | 3 +++ DEVICES.md | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 258cbab1f1..e0a536f320 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -594,3 +594,6 @@ Further device support has been made with the assistance of users. Please consid - [Trychlik](https://github.com/Trychlik) for assisting with support for Tesla S300 air purifier. - [thewade](https://github.com/thewade) for contributing support for PlantsIO Ivy smart planter. - [bjeanes](https://github.com/bjeanes) for contributing support for Bonaire HPC5200020 heater. +- [Jame](https://github.com/Jame) for contributing support for Arlec APR005HA air purifier. +- [jianyun8023](https://github.com/jianyun8023) for contributing Chinese (Simplified) translations, and support for Casdon TD Pro oven. +- [lankhaar](https://github.com/lankhaar) for contributing support for Zedar R600 vacuum. diff --git a/DEVICES.md b/DEVICES.md index 37b26bc31c..7852b00fff 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -234,6 +234,7 @@ ### Air Purifiers +- Arlec APR005HA air purifier - Breville Easy Air purifier - Breville Smart Air Connect purifier - Breville Smart Air Viral Protect Plus purifier @@ -326,13 +327,14 @@ ### Kitchen Appliances - Anko 1.7L smart kettle -- Setti+ KT950W smart kettle +- Casdon TD Pro 2 oven - Inkbird iBBQ-4BW cooking probe thermometer - Inkbird iBBQ-4T cooking probe thermometer (separate and combined measurement variants) - Inkbird IBS-M1S temperature probe hub - Inkbird IBT-26S BBQ thermometer - Inkbird sous vide cooker (also supports Silvercrest sous vide sticks) - Kogan glass 1.7L smart kettle +- Setti+ KT950W smart kettle - Silvercrest 1.7L smart kettle - Ultenic K10 air fryer - Weekett smart kettle @@ -594,7 +596,7 @@ of device. - Tesvor S6 vacuum cleaner with mop - TTEC Robi Pro vacuum cleaner - Ultenic T10 vacuum cleaner -- Zedar R600 +- Zedar R600 vacuum cleaner ### Lawnmowers From 0397f776491218cd2170f801890a8ad8e958a443 Mon Sep 17 00:00:00 2001 From: almirus Date: Tue, 16 Jul 2024 10:25:10 +0300 Subject: [PATCH 044/169] Update dongguan_electric_curtain.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7 DP is't action, it's learning state { "abilityId": 7, "accessMode": "ro", "code": "work_state", "description": "每次进入页面时判断学习状态“\\n1、standby为未学习状态,面板显示学习页面;\\n2、learning为学习中状态,此时面板禁用“开始学习”按钮,无法下发。\\n3、success为学习完成状态,显示控制页面。在学习页面收到success上报时,面板弹窗提示学习成功,点击确认后跳转到控制页面。\\n4、fail为学习失败状态,设备上报fail并将学习按钮上报false使能,此时面板弹窗提示”“学习失败,请检查方向是否选择正确并重新开始学习。”", "name": "学习状态", "typeSpec": { "type": "enum", "range": [ "standby", "learning", "success", "fail" ] } }, --- .../devices/dongguan_electric_curtain.yaml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/custom_components/tuya_local/devices/dongguan_electric_curtain.yaml b/custom_components/tuya_local/devices/dongguan_electric_curtain.yaml index eac21a66d0..b70d426ccb 100644 --- a/custom_components/tuya_local/devices/dongguan_electric_curtain.yaml +++ b/custom_components/tuya_local/devices/dongguan_electric_curtain.yaml @@ -28,23 +28,8 @@ primary_entity: optional: true persist: false - id: 7 - name: action + name: learning_state type: string - mapping: - - dps_val: opening - value: opening - constraint: current_position - conditions: - - dps_val: 0 - value: opened - - dps_val: closing - value: closing - constraint: current_position - conditions: - - dps_val: 100 - value: closed - - dps_val: null - value: closed - id: 12 name: fault_code type: bitfield From c7ed993c5b4ea5a74f0d9a9167e4b628e95c85bf Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 15 Jul 2024 23:25:32 +0900 Subject: [PATCH 045/169] Correct attribution Need to use github username, not from commit log --- ACKNOWLEDGEMENTS.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index e0a536f320..6477c93ff6 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -310,7 +310,7 @@ Further device support has been made with the assistance of users. Please consid - [jrotenstein](https://github.com/jrotenstein) for contributing support for Aquatech Rapid X6 water heaters. - [hanzwo](https://github.com/hanzwo) for contributing support for Windcalm ceiling fans. - [stikonas](https://github.com/stikonas) for contributing support for Monzana Klimaanlage air conditioners. -- [horse-pants](https://github.com/horse-pants) for contributing support for Goldair tower fans. +- [horse-pants](https://github.com/horse-pants) for contributing support for Goldair tower fans, and Arlec APR005HA air purifier. - [xpavli44](https://github.com/xpavli44) for contributing Czech translations. - [kondi](https://github.com/kondi) for contributing improvements to masked values and Starlight heatpumps. - [scotttimmins](https://github.com/scotttimmins) for contributing support for 4 outlet + USB smart powerstrip and Depauley ceiling fan. @@ -594,6 +594,5 @@ Further device support has been made with the assistance of users. Please consid - [Trychlik](https://github.com/Trychlik) for assisting with support for Tesla S300 air purifier. - [thewade](https://github.com/thewade) for contributing support for PlantsIO Ivy smart planter. - [bjeanes](https://github.com/bjeanes) for contributing support for Bonaire HPC5200020 heater. -- [Jame](https://github.com/Jame) for contributing support for Arlec APR005HA air purifier. - [jianyun8023](https://github.com/jianyun8023) for contributing Chinese (Simplified) translations, and support for Casdon TD Pro oven. - [lankhaar](https://github.com/lankhaar) for contributing support for Zedar R600 vacuum. From 7d49b8e2d36f63a89b5e27c55cd4b3ee2ab6f617 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 16 Jul 2024 21:02:53 +0900 Subject: [PATCH 046/169] ZY-M100-W: make sensitivity configs optional For some reason the two sensitivity adjustments are not always reported. Issue #1913 --- .../tuya_local/devices/zym100w_presence_sensor.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/tuya_local/devices/zym100w_presence_sensor.yaml b/custom_components/tuya_local/devices/zym100w_presence_sensor.yaml index e5f6de65c1..5f6a4bfbcf 100644 --- a/custom_components/tuya_local/devices/zym100w_presence_sensor.yaml +++ b/custom_components/tuya_local/devices/zym100w_presence_sensor.yaml @@ -40,6 +40,7 @@ secondary_entities: - id: 2 type: integer name: value + optional: true range: min: 1 max: 10 @@ -91,6 +92,7 @@ secondary_entities: - id: 102 type: integer name: value + optional: true range: min: 1 max: 10 From 64b4eac7a91c6c2657e6f0fd5019243b74eb6516 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 17 Jul 2024 19:46:19 +0900 Subject: [PATCH 047/169] BLE YL01 water tester: remove duplicate config The config was previously renamed, but a subsequent change brought it back accidentally. Since that got released, we need a migration to ensure users are using the correct file in their device config. Issue #2056 --- custom_components/tuya_local/__init__.py | 14 + custom_components/tuya_local/config_flow.py | 2 +- .../devices/ble-yl01_waterquality_tester.yaml | 241 ------------------ .../devices/ble_yl01_watertester.yaml | 58 ++++- 4 files changed, 69 insertions(+), 246 deletions(-) delete mode 100644 custom_components/tuya_local/devices/ble-yl01_waterquality_tester.yaml diff --git a/custom_components/tuya_local/__init__.py b/custom_components/tuya_local/__init__.py index 3091e7e9e2..64ec0f7d94 100644 --- a/custom_components/tuya_local/__init__.py +++ b/custom_components/tuya_local/__init__.py @@ -493,6 +493,20 @@ def update_unique_id13_3(entity_entry): await async_migrate_entries(hass, entry.entry_id, update_unique_id13_3) hass.config_entries.async_update_entry(entry, minor_version=3) + + if entry.version == 13 and entry.minor_version < 4: + conf = entry.data | entry.options + conf_type = conf[CONF_TYPE] + # Duolicate config removal - make sure the correct one is used + if conf_type == "ble-yl01_waterquality_tester": + conf_type = "ble_yl01_watertester" + + hass.config_entries.async_update_entry( + entry, + data={**entry.data, CONF_TYPE: conf_type}, + options={**entry.options}, + minor_version=4, + ) return True diff --git a/custom_components/tuya_local/config_flow.py b/custom_components/tuya_local/config_flow.py index 7050ff1eca..5dedc377d2 100644 --- a/custom_components/tuya_local/config_flow.py +++ b/custom_components/tuya_local/config_flow.py @@ -73,7 +73,7 @@ class ConfigFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): VERSION = 13 - MINOR_VERSION = 3 + MINOR_VERSION = 4 CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH device = None data = {} diff --git a/custom_components/tuya_local/devices/ble-yl01_waterquality_tester.yaml b/custom_components/tuya_local/devices/ble-yl01_waterquality_tester.yaml deleted file mode 100644 index d8ab92e888..0000000000 --- a/custom_components/tuya_local/devices/ble-yl01_waterquality_tester.yaml +++ /dev/null @@ -1,241 +0,0 @@ -name: Water quality monitor -products: - - id: v1jqz5cy - name: BLE-YL01 Waterquality tester -primary_entity: - entity: sensor - icon: "mdi:pool-thermometer" - class: temperature - dps: - - id: 2 - type: integer - name: sensor - unit: "°C" - class: measurement - mapping: - - scale: 10 -secondary_entities: - - entity: sensor - name: TDS - dps: - - id: 1 - type: integer - name: sensor - class: measurement - unit: "ppm" - - entity: sensor - class: battery - category: diagnostic - dps: - - id: 7 - type: integer - name: sensor - unit: "%" - - entity: sensor - class: ph - dps: - - id: 10 - type: integer - name: sensor - class: measurement - mapping: - - scale: 10 - - entity: sensor - name: EC - icon: "mdi:omega" - dps: - - id: 11 - type: integer - name: sensor - unit: uS/cm - class: measurement - - entity: sensor - name: ORP - dps: - - id: 101 - type: integer - name: sensor - unit: mV - class: measurement - - entity: sensor - name: CL - dps: - - id: 102 - type: integer - name: sensor - unit: mg/L - class: measurement - - entity: select - name: pH buffer standard - icon: "mdi:ph" - category: config - dps: - - id: 103 - type: string - name: option - mapping: - - dps_val: AsiaStandard - value: Asia - - dps_val: EUStandard - value: EU - - entity: light - translation_key: backlight - category: config - dps: - - id: 104 - type: boolean - name: switch - - id: 105 - type: integer - name: backlight_value - # may be brightness, but only log we have has 0 value and range - # is unusally high - up to 16M - - entity: number - name: Maximum pH - class: ph - category: config - dps: - - id: 106 - type: integer - name: value - range: - min: 0 - max: 140 - mapping: - - scale: 10 - - entity: number - name: Minimum pH - category: config - class: ph - dps: - - id: 107 - type: integer - name: value - range: - min: 0 - max: 140 - mapping: - - scale: 10 - - entity: number - name: Maximum EC - category: config - icon: "mdi:omega" - dps: - - id: 108 - type: integer - name: value - unit: "uS/cm" - range: - min: 0 - max: 20000 - - entity: number - name: Minimum EC - category: config - icon: "mdi:omega" - dps: - - id: 109 - type: integer - name: value - unit: "uS/cm" - range: - min: 0 - max: 20000 - - entity: number - name: Maximum ORP - icon: "mdi:virus-off" - category: config - dps: - - id: 110 - type: integer - name: value - unit: "mV" - range: - min: -1200 - max: 1200 - - entity: number - name: Minimum ORP - icon: "mdi:virus-off" - category: config - dps: - - id: 111 - type: integer - name: value - unit: "mV" - range: - min: -1200 - max: 1200 - - entity: number - name: Maximum CL - category: config - dps: - - id: 112 - type: integer - name: value - unit: "mg/L" - range: - min: 0 - max: 40 - - entity: number - name: Minimum CL - category: config - dps: - - id: 113 - type: integer - name: value - unit: "mg/L" - range: - min: 0 - max: 40 - - entity: number - name: pH calibration - category: config - icon: "mdi:ph" - dps: - - id: 114 - type: integer - name: value - range: - min: 0 - max: 1400 - mapping: - - scale: 100 - - entity: number - name: EC calibration - category: config - icon: "mdi:omega" - dps: - - id: 115 - type: integer - name: value - unit: uS/cm - range: - min: 0 - max: 20000 - - entity: number - name: ORP calibration - category: config - icon: "mdi:virus-off" - dps: - - id: 116 - type: integer - name: value - unit: mV - range: - min: -1200 - max: 1200 - - entity: sensor - name: Salinity - dps: - - id: 117 - type: integer - name: sensor - class: measurement - unit: "ppm" - - entity: button - name: pH reset - class: restart - category: config - dps: - - id: 118 - type: boolean - name: button diff --git a/custom_components/tuya_local/devices/ble_yl01_watertester.yaml b/custom_components/tuya_local/devices/ble_yl01_watertester.yaml index 7013c613d8..d8ab92e888 100644 --- a/custom_components/tuya_local/devices/ble_yl01_watertester.yaml +++ b/custom_components/tuya_local/devices/ble_yl01_watertester.yaml @@ -85,6 +85,11 @@ secondary_entities: - id: 104 type: boolean name: switch + - id: 105 + type: integer + name: backlight_value + # may be brightness, but only log we have has 0 value and range + # is unusally high - up to 16M - entity: number name: Maximum pH class: ph @@ -147,6 +152,18 @@ secondary_entities: range: min: -1200 max: 1200 + - entity: number + name: Minimum ORP + icon: "mdi:virus-off" + category: config + dps: + - id: 111 + type: integer + name: value + unit: "mV" + range: + min: -1200 + max: 1200 - entity: number name: Maximum CL category: config @@ -170,14 +187,39 @@ secondary_entities: min: 0 max: 40 - entity: number - name: Minimum ORP - icon: "mdi:virus-off" + name: pH calibration category: config + icon: "mdi:ph" dps: - - id: 111 + - id: 114 type: integer name: value - unit: "mV" + range: + min: 0 + max: 1400 + mapping: + - scale: 100 + - entity: number + name: EC calibration + category: config + icon: "mdi:omega" + dps: + - id: 115 + type: integer + name: value + unit: uS/cm + range: + min: 0 + max: 20000 + - entity: number + name: ORP calibration + category: config + icon: "mdi:virus-off" + dps: + - id: 116 + type: integer + name: value + unit: mV range: min: -1200 max: 1200 @@ -189,3 +231,11 @@ secondary_entities: name: sensor class: measurement unit: "ppm" + - entity: button + name: pH reset + class: restart + category: config + dps: + - id: 118 + type: boolean + name: button From 6ff59d75327ab98af8b9ac864e0867d20d1d0811 Mon Sep 17 00:00:00 2001 From: Steve Wong Date: Tue, 16 Jul 2024 16:46:13 +0000 Subject: [PATCH 048/169] Translations (zh-hant) --- .../tuya_local/translations/zh-Hant.json | 336 ++++++++++++++++++ 1 file changed, 336 insertions(+) create mode 100644 custom_components/tuya_local/translations/zh-Hant.json diff --git a/custom_components/tuya_local/translations/zh-Hant.json b/custom_components/tuya_local/translations/zh-Hant.json new file mode 100644 index 0000000000..12039a7d68 --- /dev/null +++ b/custom_components/tuya_local/translations/zh-Hant.json @@ -0,0 +1,336 @@ +{ + "title": "Tuya Local", + "config": { + "step": { + "user": { + "title": "配置您的Tuya Local設備", + "description": "您可以手動新增設備,或透過Smart Life應用的雲端服務輔助添加。", + "data": { + "setup_mode": "設定選項:" + } + }, + "cloud": { + "title": "登入Tuya", + "description": "輸入您的Smart Life或Tuya Smart使用者代碼。 \n\n您可以在Smart Life或Tuya Smart應用的**設定** > **帳戶和安全性**頁面找到此代碼,並在**使用者代碼**欄位中輸入。使用者程式碼區分大小寫,請確保準確輸入。", + "data": { + "user_code": "使用者程式碼:" + } + }, + "scan": { + "title": "完成登入", + "description": "使用Smart Life或Tuya Smart應用程式掃描以下二維碼以完成登入。 \n\n完成此步驟後,繼續下一步。" + }, + "choose_device": { + "title": "選擇要新增的設備", + "description": "請從下拉清單中選擇要新增的設備。已新增的設備不會顯示。 \n\n如果裝置透過網關連接,請從網關清單中選擇,否則選擇無。", + "data": { + "device_id": "選擇設備:", + "hub_id": "選擇網關:" + } + }, + "search": { + "title": "定位設備IP位址", + "description": "Tuya雲端不提供本地IP位址,因此我們現在必須搜尋您的本地網路以找到裝置。這需要最多20秒。 \n\n如果搜尋不成功,您需要透過其他方式提供IP位址,例如從路由器的DHCP分配中取得。 \n\n為了使此步驟和後續的裝置新增成功,您必須關閉行動應用,否則其連線會阻止Tuya Local與裝置的通訊。" + }, + "local": { + "title": "配置您的Tuya Local設備", + "description": "[請按照這些說明找到您的裝置ID和 Local key](https://github.com/make-all/tuya-local#finding-your-device-id-and-local-key)", + "data": { + "host": "IP位址或主機名", + "device_id": "設備ID", + "local_key": "Local key", + "protocol_version": "協議版本(如果不清楚,請選擇自動)", + "poll_only": "僅輪詢(如果設備無法正常運作,請選擇此項)", + "device_cid": "子設備ID(對於透過網關連接的設備)" + } + }, + "select_type": { + "title": "選擇設備類型", + "description": "選擇與您的裝置相符的類型", + "data": { + "type": "設備類型" + } + }, + "choose_entities": { + "title": "設備詳情", + "description": "為此設備選擇一個名稱", + "data": { + "name": "名稱" + } + } + }, + "abort": { + "already_configured": "該ID的設備已新增。", + "not_supported": "抱歉,不支援此設備。", + "no_devices": "無法找到該帳戶的任何未註冊設備。" + }, + "error": { + "connection": "無法使用這些詳細資訊連接到您的裝置。這可能是間歇性問題,或資訊不正確。", + "does_not_need_hub": "設備不需要網關,但選擇了一個。請檢查您的選擇。", + "needs_hub": "設備需要網關,但未選擇。" + } + }, + "selector": { + "setup_mode": { + "options": { + "cloud": "Smart Life雲端輔助設備設定。", + "manual": "手動提供設備連接資訊。" + } + } + }, + "options": { + "step": { + "user": { + "title": "配置您的Tuya Local設備", + "description": "[請按照這些說明找到您的 Local key](https://github.com/make-all/tuya-local#finding-your-device-id-and-local-key)", + "data": { + "host": "IP位址或主機名", + "local_key": "Local key", + "protocol_version": "協議版本(如果不清楚,請選擇自動)", + "poll_only": "僅輪詢(如果設備無法正常運作,請選擇此項)", + "device_cid": "子設備ID(對於透過網關連接的設備)" + } + } + }, + "error": { + "connection": "無法使用這些詳細資訊連接到您的裝置。這可能是間歇性問題,或資訊不正確。" + }, + "abort": { + "not_supported": "抱歉,不支援此設備。" + } + }, + "entity": { + "binary_sensor": { + "defrost": { + "name": "除霜", + "state": { + "off": "正常", + "on": "除霜中" + } + }, + "tank_empty": { + "name": "水箱", + "state": { + "off": "正常", + "on": "缺水" + } + }, + "tank_full": { + "name": "水箱", + "state": { + "off": "正常", + "on": "滿水" + } + } + }, + "climate": { + "aircon_extra": { + "state_attributes": { + "fan_mode": { + "state": { + "health": "健康", + "medhigh": "中高", + "medlow": "中低", + "natural": "自然", + "quiet": "安靜", + "sleep": "睡眠", + "strong": "強力" + } + }, + "swing_mode": { + "state": { + "topmost": "最高", + "top": "高", + "middle": "中", + "down": "低", + "downmost": "最低" + } + } + } + }, + "thermostat": { + "state_attributes": { + "fan_mode": { + "state": { + "cycle": "循環" + } + }, + "preset_mode": { + "state": { + "manual": "手動", + "program": "程式", + "temp_override": "臨時覆蓋", + "perm_override": "永久覆蓋" + } + } + } + }, + "combo_floor": { + "state_attributes": { + "preset_mode": { + "state": { + "cool": "冷風", + "fan_only": "風扇", + "heat": "熱風", + "floor_cool": "冷地板", + "floor_heat": "熱地板" + } + } + } + }, + "swing_as_powerlevel": { + "state_attributes": { + "swing_mode": { + "name": "加熱水平", + "state": { + "stop": "停止", + "auto": "自動" + } + } + } + }, + "pool_heatpump": { + "state_attributes": { + "preset_mode": { + "state": { + "smart_heat": "智能加熱", + "quick_heat": "快速加熱", + "quiet_heat": "安靜加熱", + "smart_cool": "智能冷卻", + "quick_cool": "快速冷卻", + "quiet_cool": "安靜冷卻", + "auto": "自動" + } + } + } + }, + "heater": { + "name": "加热器" + }, + "thermo_switch": { + "state_attributes": { + "hvac_mode": { + "state": { + "fan_only": "暫停" + } + } + } + } + }, + "humidifier": { + "dehumidifier": { + "state_attributes": { + "mode": { + "state": { + "laundry": "烘乾衣物", + "purify": "淨化" + } + } + } + } + }, + "fan": { + "fan_with_presets": { + "state_attributes": { + "preset_mode": { + "state": { + "baby": "嬰兒", + "fresh": "清新", + "nature": "自然", + "normal": "正常", + "sleep": "睡眠", + "smart": "智能", + "strong": "強勁", + "displayoff": "關閉顯示", + "off": "關閉" + } + } + } + }, + "ventilation": { + "state_attributes": { + "preset_mode": { + "state": { + "fresh": "新風", + "circulate": "循環", + "sleep": "睡眠", + "auto": "自動", + "eco": "節能", + "anti-condensation": "防凝結" + } + } + } + } + }, + "light": { + "backlight": { + "name": "背光" + }, + "display": { + "name": "顯示" + }, + "embers": { + "name": "餘燼" + }, + "flame": { + "name": "火焰" + }, + "indicator": { + "name": "指示燈" + }, + "laser": { + "name": "雷射" + }, + "logs": { + "name": "紀錄" + }, + "nightlight": { + "name": "夜燈" + } + }, + "lock": { + "child_lock": { + "name": "兒童鎖" + } + }, + "number": { + "timer": { + "name": "計時器" + } + }, + "select": { + "timer": { + "name": "計時器" + }, + "temperature_unit": { + "name": "溫度單位", + "state": { + "celsius": "攝氏度", + "fahrenheit": "華氏度" + } + } + }, + "sensor": { + "time_remaining": { + "name": "剩餘時間" + } + }, + "switch": { + "anti_frost": { + "name": "防凍" + }, + "evaporator_cleaning": { + "name": "蒸發器清潔" + }, + "ionizer": { + "name": "離子產生器" + }, + "keytone": { + "name": "按鍵音" + }, + "uv_sterilization": { + "name": "紫外線消毒" + } + } + } +} From 5eb65d0d6cd824cf89b78672b50ecd6c23071a5a Mon Sep 17 00:00:00 2001 From: joe-sydney <74637159+joe-sydney@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:54:17 +1000 Subject: [PATCH 049/169] Add files via upload --- .../devices/connect_white_gu10.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 custom_components/tuya_local/devices/connect_white_gu10.yaml diff --git a/custom_components/tuya_local/devices/connect_white_gu10.yaml b/custom_components/tuya_local/devices/connect_white_gu10.yaml new file mode 100644 index 0000000000..c692c71f4a --- /dev/null +++ b/custom_components/tuya_local/devices/connect_white_gu10.yaml @@ -0,0 +1,28 @@ +name: CCT Light +products: + - id: xhkuywg6rwwqocl6 + name: Connect White GU10 +primary_entity: + entity: light + dps: + - id: 1 + type: boolean + name: switch + - id: 2 + type: integer + name: brightness + optional: true + range: + min: 25 + max: 255 + - id: 3 + type: integer + optional: true + name: color_temp + range: + min: 0 + max: 255 + mapping: + - target_range: + min: 2700 + max: 6500 From 8fc7494b78dc8ea10b8c1d69a88db5e2065a8646 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 17 Jul 2024 11:04:41 +0900 Subject: [PATCH 050/169] Rename connect_white_gu10.yaml to cct_v1_lightbulb.yaml This follows the older generic dp mapping for Tuya lightbubs (v1). cct_lightbulb.yaml already exists for the newer v2 mapping, so name this as v1. It also matches gold_cct_lightbulb.yaml, but that has a non-standard color temperature range, and some additional (optional) config options. PR #2125 --- .../devices/{connect_white_gu10.yaml => cct_v1_lightbulb.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename custom_components/tuya_local/devices/{connect_white_gu10.yaml => cct_v1_lightbulb.yaml} (100%) diff --git a/custom_components/tuya_local/devices/connect_white_gu10.yaml b/custom_components/tuya_local/devices/cct_v1_lightbulb.yaml similarity index 100% rename from custom_components/tuya_local/devices/connect_white_gu10.yaml rename to custom_components/tuya_local/devices/cct_v1_lightbulb.yaml From 543f9bbee531f03a83fa58a09a116853f0b4ffac Mon Sep 17 00:00:00 2001 From: Ezequiel Krause Date: Fri, 12 Jul 2024 15:17:42 -0300 Subject: [PATCH 051/169] Added support for V330L-DU4L-VS pet feeder --- .../devices/v330l_DU4L_petfeeder.yaml | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml diff --git a/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml b/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml new file mode 100644 index 0000000000..b4f5347e4d --- /dev/null +++ b/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml @@ -0,0 +1,166 @@ +name: Pet feeder +products: + - id: cjrm04np59ut4pwb + name: V330L-DU4L-VS Petfeeder + # Needs to be added using the 3.2 protocol +primary_entity: + entity: number + name: Manual feed + icon: "mdi:food-drumstick" + dps: + - id: 201 + type: integer + name: value + unit: portions + optional: true + persist: false + range: + min: 0 + max: 10 + - id: 202 + type: integer + name: food_weight + optional: true + mapping: + - scale: 10 + - id: 203 + type: integer + name: control + optional: true + - id: 204 + type: integer + name: realtime_data + optional: true + - id: 205 + type: integer + name: weight + optional: true + - id: 207 + type: string + name: schedule + optional: true + - id: 208 + type: string + name: voice_record + optional: true +secondary_entities: + - entity: light + translation_key: indicator + category: config + dps: + - id: 101 + type: boolean + name: switch + - entity: switch + name: Flip + icon: "mdi:flip-horizontal" + category: config + dps: + - id: 103 + type: boolean + name: switch + optional: true + - entity: switch + name: Timestamp + icon: "mdi:clock-time-eight" + category: config + dps: + - id: 104 + type: boolean + name: switch + optional: true + - entity: switch + name: Motion notification + icon: "mdi:motion-sensor" + category: config + dps: + - id: 134 + type: boolean + name: switch + optional: true + - entity: select + name: Motion sensitivity + icon: "mdi:motion-sensor" + category: config + dps: + - id: 106 + type: string + name: option + optional: true + mapping: + - dps_val: "0" + value: Low + - dps_val: "1" + value: Medium + - dps_val: "2" + value: High + - entity: select + name: Nightvision + icon: "mdi:weather-night" + category: config + dps: + - id: 108 + type: string + name: option + optional: true + mapping: + - dps_val: "0" + value: Auto + - dps_val: "1" + value: "Off" + - dps_val: "2" + value: "On" + - entity: binary_sensor + name: Food empty + class: problem + category: diagnostic + dps: + - id: 206 + type: bitfield + name: sensor + optional: true + mapping: + - dps_val: 1 + value: true + - value: false + - entity: binary_sensor + name: Not enough food + class: problem + category: diagnostic + dps: + - id: 206 + type: bitfield + name: sensor + optional: true + mapping: + - dps_val: 2 + value: true + - value: false + - entity: binary_sensor + name: Blocked + class: problem + category: diagnostic + dps: + - id: 206 + type: bitfield + name: sensor + optional: true + mapping: + - dps_val: 4 + value: true + - value: false + - entity: camera + dps: + - id: 113 + type: boolean + optional: true + name: record + mapping: + - dps_val: null + value: false + hidden: true + - id: 115 + type: base64 + name: snapshot + optional: true + sensitive: true From 60b8484ec281f3a80d1484a3d7fdb9637b692cd3 Mon Sep 17 00:00:00 2001 From: Ezequiel Krause Date: Mon, 15 Jul 2024 09:27:31 -0300 Subject: [PATCH 052/169] Update v330l_DU4L_petfeeder.yaml Camera sensor to generic text sensor --- .../tuya_local/devices/v330l_DU4L_petfeeder.yaml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml b/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml index b4f5347e4d..87ae4b564c 100644 --- a/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml +++ b/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml @@ -149,18 +149,12 @@ secondary_entities: - dps_val: 4 value: true - value: false - - entity: camera + - entity: sensor + name: Snapshot data + category: diagnostic dps: - - id: 113 - type: boolean - optional: true - name: record - mapping: - - dps_val: null - value: false - hidden: true - id: 115 type: base64 - name: snapshot + name: sensor optional: true sensitive: true From f6bcba8e1a46c3877963a30b3c65232d3837c21a Mon Sep 17 00:00:00 2001 From: Ezequiel Krause Date: Wed, 17 Jul 2024 09:00:39 -0300 Subject: [PATCH 053/169] Update v330l_DU4L_petfeeder.yaml --- .../devices/v330l_DU4L_petfeeder.yaml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml b/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml index 87ae4b564c..316414dbbc 100644 --- a/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml +++ b/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml @@ -149,12 +149,19 @@ secondary_entities: - dps_val: 4 value: true - value: false - - entity: sensor - name: Snapshot data - category: diagnostic + - entity: switch + name: Record + icon: "mdi:record-rec" + category: config dps: + - id: 113 + type: boolean + optional: true + name: switch + mapping: + - dps_val: null + value: false - id: 115 type: base64 - name: sensor + name: snapshot_data optional: true - sensitive: true From 4bf6f3c52921bef894124b72744514670754b238 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 18 Jul 2024 19:30:08 +0900 Subject: [PATCH 054/169] Smartplug USB: make config entities and sensors optional - Config entities are missing on some plugs (even with the same product id) - sensors are marked as force: true, but were not optional. Atributes that require forced updates are not always reported without that forcing, so must be optional. Discussion #2126 --- custom_components/tuya_local/devices/smartplug_usb.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom_components/tuya_local/devices/smartplug_usb.yaml b/custom_components/tuya_local/devices/smartplug_usb.yaml index 383e625e6c..9304a472f6 100644 --- a/custom_components/tuya_local/devices/smartplug_usb.yaml +++ b/custom_components/tuya_local/devices/smartplug_usb.yaml @@ -33,6 +33,7 @@ secondary_entities: name: sensor type: integer class: measurement + optional: true force: true unit: V mapping: @@ -50,6 +51,7 @@ secondary_entities: type: integer class: measurement force: true + optional: true unit: mA - id: 23 type: integer @@ -64,6 +66,7 @@ secondary_entities: type: integer class: measurement force: true + optional: true unit: W mapping: - scale: 10 @@ -108,6 +111,7 @@ secondary_entities: dps: - id: 38 type: string + optional: true name: option mapping: - dps_val: power_on @@ -124,6 +128,7 @@ secondary_entities: - id: 39 type: string name: option + optional: true mapping: - dps_val: relay value: State From cded1b316899465200276fedec84b09fadad008d Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 18 Jul 2024 19:43:40 +0900 Subject: [PATCH 055/169] V330L: merge with new config, as the devices are identical Only differences in config were product id and name, and original used camera entity, while new one used switch after review feedback because the device is returning a filename in json not the image data. Original report #2027 seems to say that one does too. PR #2105 --- .../devices/v330l_DU4L_petfeeder.yaml | 167 ------------------ .../tuya_local/devices/v330l_petfeeder.yaml | 9 +- 2 files changed, 7 insertions(+), 169 deletions(-) delete mode 100644 custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml diff --git a/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml b/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml deleted file mode 100644 index 316414dbbc..0000000000 --- a/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml +++ /dev/null @@ -1,167 +0,0 @@ -name: Pet feeder -products: - - id: cjrm04np59ut4pwb - name: V330L-DU4L-VS Petfeeder - # Needs to be added using the 3.2 protocol -primary_entity: - entity: number - name: Manual feed - icon: "mdi:food-drumstick" - dps: - - id: 201 - type: integer - name: value - unit: portions - optional: true - persist: false - range: - min: 0 - max: 10 - - id: 202 - type: integer - name: food_weight - optional: true - mapping: - - scale: 10 - - id: 203 - type: integer - name: control - optional: true - - id: 204 - type: integer - name: realtime_data - optional: true - - id: 205 - type: integer - name: weight - optional: true - - id: 207 - type: string - name: schedule - optional: true - - id: 208 - type: string - name: voice_record - optional: true -secondary_entities: - - entity: light - translation_key: indicator - category: config - dps: - - id: 101 - type: boolean - name: switch - - entity: switch - name: Flip - icon: "mdi:flip-horizontal" - category: config - dps: - - id: 103 - type: boolean - name: switch - optional: true - - entity: switch - name: Timestamp - icon: "mdi:clock-time-eight" - category: config - dps: - - id: 104 - type: boolean - name: switch - optional: true - - entity: switch - name: Motion notification - icon: "mdi:motion-sensor" - category: config - dps: - - id: 134 - type: boolean - name: switch - optional: true - - entity: select - name: Motion sensitivity - icon: "mdi:motion-sensor" - category: config - dps: - - id: 106 - type: string - name: option - optional: true - mapping: - - dps_val: "0" - value: Low - - dps_val: "1" - value: Medium - - dps_val: "2" - value: High - - entity: select - name: Nightvision - icon: "mdi:weather-night" - category: config - dps: - - id: 108 - type: string - name: option - optional: true - mapping: - - dps_val: "0" - value: Auto - - dps_val: "1" - value: "Off" - - dps_val: "2" - value: "On" - - entity: binary_sensor - name: Food empty - class: problem - category: diagnostic - dps: - - id: 206 - type: bitfield - name: sensor - optional: true - mapping: - - dps_val: 1 - value: true - - value: false - - entity: binary_sensor - name: Not enough food - class: problem - category: diagnostic - dps: - - id: 206 - type: bitfield - name: sensor - optional: true - mapping: - - dps_val: 2 - value: true - - value: false - - entity: binary_sensor - name: Blocked - class: problem - category: diagnostic - dps: - - id: 206 - type: bitfield - name: sensor - optional: true - mapping: - - dps_val: 4 - value: true - - value: false - - entity: switch - name: Record - icon: "mdi:record-rec" - category: config - dps: - - id: 113 - type: boolean - optional: true - name: switch - mapping: - - dps_val: null - value: false - - id: 115 - type: base64 - name: snapshot_data - optional: true diff --git a/custom_components/tuya_local/devices/v330l_petfeeder.yaml b/custom_components/tuya_local/devices/v330l_petfeeder.yaml index 7e123d7508..3498df4121 100644 --- a/custom_components/tuya_local/devices/v330l_petfeeder.yaml +++ b/custom_components/tuya_local/devices/v330l_petfeeder.yaml @@ -2,6 +2,8 @@ name: Pet feeder products: - id: ibnk6keua0zzc2gr name: V330 Petfeeder + - id: cjrm04np59ut4pwb + name: V330L-DU4L-VS Petfeeder # Needs to be added using the 3.2 protocol primary_entity: entity: number @@ -149,12 +151,15 @@ secondary_entities: - dps_val: 4 value: true - value: false - - entity: camera + - entity: switch + name: Record + icon: "mdi:record-rec" + category: config dps: - id: 113 type: boolean optional: true - name: record + name: switch mapping: - dps_val: null value: false From 28d541140fd6323cba7da5b72333ba912e51c503 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 18 Jul 2024 20:55:04 +0900 Subject: [PATCH 056/169] Docs for recent PRs. PR #2105 (reverted and merged with older config for same family device) PR #2119, #2123, #2125 --- ACKNOWLEDGEMENTS.md | 5 ++++- DEVICES.md | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 6477c93ff6..d99b31b995 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -447,7 +447,7 @@ Further device support has been made with the assistance of users. Please consid - [convicte](https://github.com/convicte) for assisting with support for Inna 7 channel underfloor heating controllers. - [mrtn1988](https://github.com/mrtn1988) for assisting with support for QH-GD Elegant IR heaters. - [uandco](https://github.com/uandco) for assisting with support for Evotherm ETI pool heatpumps. -- [almirus](https://github.com/almirus) for contributing support for Neatsvor X500 vacuums, TH05-BLE temperature/humidity sensors, SGS01 and TCS024B soil moisture BLE sensors, Donguan curtain robots, LightStar track lights, Royal Clima Fresh heatpumps. +- [almirus](https://github.com/almirus) for contributing support for Neatsvor X500 vacuums, TH05-BLE temperature/humidity sensors, SGS01 and TCS024B soil moisture BLE sensors, Dongguan curtain robots, LightStar track lights, Royal Clima Fresh heatpumps. - [kinkamez](https://github.com/kinkamez) for contributing support for Prosto PRC 2000 heaters. - [MarkPaxton](https://github.com/MarkPaxton) for contributing support for Hombli radiator controllers. - [mmib](https://github.com/mmib) for contributing support for Becasmart irrigation systems. @@ -596,3 +596,6 @@ Further device support has been made with the assistance of users. Please consid - [bjeanes](https://github.com/bjeanes) for contributing support for Bonaire HPC5200020 heater. - [jianyun8023](https://github.com/jianyun8023) for contributing Chinese (Simplified) translations, and support for Casdon TD Pro oven. - [lankhaar](https://github.com/lankhaar) for contributing support for Zedar R600 vacuum. +- [swonge](https://github.com/swonge) for contributing Chinese (Traditional) translations. +- [joe-sydney](https://github.com/joe-sydney) for contributing support for old style generic CCT lightbulbs (tested with Connect Smart GU10 downlight). +- [e2equiel](https://github.com/e2equiel) for contributing improvements to V330L pet feeder (for DU4L-VS model). diff --git a/DEVICES.md b/DEVICES.md index 7852b00fff..6e2c8397d4 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -482,7 +482,7 @@ of device. ### Lights -- Generic CCT lightbulb (supporting color temperature and brightness) +- Generic CCT lightbulb (supporting color temperature and brightness) - old and new style - Generic dimmable light (2 types, using dp 1,2 and 20,22) - Generic RGBCW/RGBWW lightbulb (confirmed with Lijun branded bulb, expected to match others also). Three versions - standard dps layout starting from 20, with and without scene/music modes and timer, and a non-standard layout starting from 1 but following the same pattern (tested with "A60" bulbs). - Generic RGBW lightbulb in the standard and non-standard patterns above but without color temperature control. From f4012b508acf3adad5fa52a90214d7337d0e77a3 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 18 Jul 2024 21:15:15 +0900 Subject: [PATCH 057/169] Maintenance: remove entities that have been deprecated over 6 months Bulk replacements due to new platforms becoming available - vacuum replaced by lawn_mower - binary_sensor replaced by event One off replacements for device improvements - water_heater replaced by climate when report came that it also supports cooling - sensor replaced by binary_sensor - fan removed as it only duplicates the humidifier modes --- .../devices/9in1_airquality_monitor.yaml | 16 -- .../tuya_local/devices/ble_hu06_lock.yaml | 14 -- .../tuya_local/devices/ble_solar_light.yaml | 13 - .../devices/bstuokey_access_keypad.yaml | 9 - ...rstein_dryfy_pro_connect_dehumidifier.yaml | 30 --- .../devices/linkoze_dual_button.yaml | 72 ------ .../devices/loratap_zigbee_six_switch.yaml | 237 ------------------ .../tuya_local/devices/lucking_hs6_lock.yaml | 13 - .../tuya_local/devices/moebot_s_mower.yaml | 43 ---- .../tuya_local/devices/pir_spotlight.yaml | 12 - .../devices/poolex_q7_heatpump.yaml | 56 ----- .../tuya_local/devices/rl_video_lock.yaml | 22 -- .../tuya_local/devices/smardeer_lock33.yaml | 10 - .../tuya_local/devices/smart_siren_alarm.yaml | 14 -- 14 files changed, 561 deletions(-) diff --git a/custom_components/tuya_local/devices/9in1_airquality_monitor.yaml b/custom_components/tuya_local/devices/9in1_airquality_monitor.yaml index c770e275b3..e303639d9b 100644 --- a/custom_components/tuya_local/devices/9in1_airquality_monitor.yaml +++ b/custom_components/tuya_local/devices/9in1_airquality_monitor.yaml @@ -101,22 +101,6 @@ secondary_entities: name: sensor unit: "%" class: measurement - - entity: sensor - name: Charge State - class: enum - category: diagnostic - deprecated: binary_sensor_plug - dps: - - id: 23 - type: boolean - name: sensor - mapping: - - dps_val: false - value: "Battery" - icon: "mdi:battery" - - dps_val: true - value: "Charging" - icon: "mdi:battery-charging" - entity: binary_sensor class: plug category: diagnostic diff --git a/custom_components/tuya_local/devices/ble_hu06_lock.yaml b/custom_components/tuya_local/devices/ble_hu06_lock.yaml index 6bf557c6f5..ab0b0b7c0d 100644 --- a/custom_components/tuya_local/devices/ble_hu06_lock.yaml +++ b/custom_components/tuya_local/devices/ble_hu06_lock.yaml @@ -150,20 +150,6 @@ secondary_entities: value: ring - dps_val: false value: null - - entity: binary_sensor - name: Doorbell - deprecated: event_doorbell - class: sound - category: diagnostic - dps: - - id: 24 - type: boolean - name: sensor - optional: true - persist: false - mapping: - - dps_val: null - value: false - entity: number name: Doorbell volume category: config diff --git a/custom_components/tuya_local/devices/ble_solar_light.yaml b/custom_components/tuya_local/devices/ble_solar_light.yaml index 2370cff327..72469cb5f8 100644 --- a/custom_components/tuya_local/devices/ble_solar_light.yaml +++ b/custom_components/tuya_local/devices/ble_solar_light.yaml @@ -122,19 +122,6 @@ secondary_entities: - dps_val: none value: clear - value: null - - entity: binary_sensor - class: motion - deprecated: event_motion - category: diagnostic - dps: - - id: 52 - type: string - name: sensor - optional: true - mapping: - - dps_val: pir - value: true - - value: false - entity: select name: Daylight cutoff icon: "mdi:contrast-box" diff --git a/custom_components/tuya_local/devices/bstuokey_access_keypad.yaml b/custom_components/tuya_local/devices/bstuokey_access_keypad.yaml index 0cace7e891..db815184f2 100644 --- a/custom_components/tuya_local/devices/bstuokey_access_keypad.yaml +++ b/custom_components/tuya_local/devices/bstuokey_access_keypad.yaml @@ -120,15 +120,6 @@ secondary_entities: value: ring - dps_val: false value: null - - entity: binary_sensor - name: Doorbell - deprecated: event_doorbell - class: sound - dps: - - id: 101 - type: boolean - name: sensor - optional: true - entity: switch name: Beep on error category: config diff --git a/custom_components/tuya_local/devices/klarstein_dryfy_pro_connect_dehumidifier.yaml b/custom_components/tuya_local/devices/klarstein_dryfy_pro_connect_dehumidifier.yaml index 462b0105be..957072ae3a 100644 --- a/custom_components/tuya_local/devices/klarstein_dryfy_pro_connect_dehumidifier.yaml +++ b/custom_components/tuya_local/devices/klarstein_dryfy_pro_connect_dehumidifier.yaml @@ -38,36 +38,6 @@ primary_entity: mapping: - step: 5 secondary_entities: - - entity: fan - deprecated: humidifier mode - dps: - - id: 1 - name: switch - type: boolean - - id: 2 - name: preset_mode - type: string - optional: true - mapping: - - dps_val: auto - value: auto - - dps_val: high - value: high - - dps_val: low - value: low - - dps_val: fan - value: Fan - - id: 102 - name: oscillate - type: string - optional: true - mapping: - - dps_val: "0_90" - value: true - - dps_val: "45" - value: false - - dps_val: "90" - value: false - entity: select name: Direction category: config diff --git a/custom_components/tuya_local/devices/linkoze_dual_button.yaml b/custom_components/tuya_local/devices/linkoze_dual_button.yaml index ef1606bb73..432976882b 100644 --- a/custom_components/tuya_local/devices/linkoze_dual_button.yaml +++ b/custom_components/tuya_local/devices/linkoze_dual_button.yaml @@ -32,78 +32,6 @@ secondary_entities: value: long_press - dps_val: double_click value: double_click - - entity: binary_sensor - name: Click 1 - deprecated: event_button_1 - dps: - - id: 1 - type: string - name: sensor - persist: false - mapping: - - dps_val: single_click - value: true - - value: false - - entity: binary_sensor - name: Click 2 - deprecated: event_button_2 - dps: - - id: 2 - type: string - name: sensor - persist: false - mapping: - - dps_val: single_click - value: true - - value: false - - entity: binary_sensor - name: Press 1 - deprecated: event_button_1 - dps: - - id: 1 - type: string - name: sensor - persist: false - mapping: - - dps_val: long_press - value: true - - value: false - - entity: binary_sensor - name: Press 2 - deprecated: event_button_2 - dps: - - id: 2 - type: string - name: sensor - persist: false - mapping: - - dps_val: long_press - value: true - - value: false - - entity: binary_sensor - name: Double click 1 - deprecated: event_button_1 - dps: - - id: 1 - type: string - name: sensor - persist: false - mapping: - - dps_val: double_click - value: true - - value: false - - entity: binary_sensor - name: Double click 2 - deprecated: event_button_2 - dps: - - id: 2 - type: string - name: sensor - persist: false - mapping: - - dps_val: double_click - value: true - - value: false - entity: sensor class: battery category: diagnostic diff --git a/custom_components/tuya_local/devices/loratap_zigbee_six_switch.yaml b/custom_components/tuya_local/devices/loratap_zigbee_six_switch.yaml index 4d812f7a7b..4d2ae6950e 100644 --- a/custom_components/tuya_local/devices/loratap_zigbee_six_switch.yaml +++ b/custom_components/tuya_local/devices/loratap_zigbee_six_switch.yaml @@ -94,243 +94,6 @@ secondary_entities: value: long_press - dps_val: double_click value: double_click - - entity: binary_sensor - name: Click 1 - deprecated: event_button_1 - dps: - - id: 1 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: single_click - value: true - - value: false - - entity: binary_sensor - name: Click 2 - deprecated: event_button_2 - dps: - - id: 2 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: single_click - value: true - - value: false - - entity: binary_sensor - name: Click 3 - deprecated: event_button_3 - dps: - - id: 3 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: single_click - value: true - - value: false - - entity: binary_sensor - name: Click 4 - deprecated: event_button_4 - dps: - - id: 4 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: single_click - value: true - - value: false - - entity: binary_sensor - name: Click 5 - deprecated: event_button_5 - dps: - - id: 5 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: single_click - value: true - - value: false - - entity: binary_sensor - name: Click 6 - deprecated: event_button_6 - dps: - - id: 6 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: single_click - value: true - - value: false - - - entity: binary_sensor - name: Long click 1 - deprecated: event_button_1 - dps: - - id: 1 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: long_press - value: true - - value: false - - entity: binary_sensor - name: Long click 2 - deprecated: event_button_2 - dps: - - id: 2 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: long_press - value: true - - value: false - - entity: binary_sensor - name: Long click 3 - deprecated: event_button_3 - dps: - - id: 3 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: long_press - value: true - - value: false - - entity: binary_sensor - name: Long click 4 - deprecated: event_button_4 - dps: - - id: 4 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: long_press - value: true - - value: false - - entity: binary_sensor - name: Long click 5 - deprecated: event_button_5 - dps: - - id: 5 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: long_press - value: true - - value: false - - entity: binary_sensor - name: Long click 6 - deprecated: event_button_6 - dps: - - id: 6 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: long_press - value: true - - value: false - - - entity: binary_sensor - name: Double click 1 - deprecated: event_button_1 - dps: - - id: 1 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: double_click - value: true - - value: false - - entity: binary_sensor - name: Double click 2 - deprecated: event_button_2 - dps: - - id: 2 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: double_click - value: true - - value: false - - entity: binary_sensor - name: Double click 3 - deprecated: event_button_3 - dps: - - id: 3 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: double_click - value: true - - value: false - - entity: binary_sensor - name: Double click 4 - deprecated: event_button_4 - dps: - - id: 4 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: double_click - value: true - - value: false - - entity: binary_sensor - name: Double click 5 - deprecated: event_button_5 - dps: - - id: 5 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: double_click - value: true - - value: false - - entity: binary_sensor - name: Double click 6 - deprecated: event_button_6 - dps: - - id: 6 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: double_click - value: true - - value: false - - entity: sensor class: battery category: diagnostic diff --git a/custom_components/tuya_local/devices/lucking_hs6_lock.yaml b/custom_components/tuya_local/devices/lucking_hs6_lock.yaml index ee090e59fc..0d9bff23d3 100644 --- a/custom_components/tuya_local/devices/lucking_hs6_lock.yaml +++ b/custom_components/tuya_local/devices/lucking_hs6_lock.yaml @@ -217,16 +217,3 @@ secondary_entities: value: ring - dps_val: false value: null - - entity: binary_sensor - name: Doorbell - deprecated: event_doorbell - class: sound - category: diagnostic - dps: - - id: 101 - type: boolean - name: sensor - optional: true - mapping: - - dps_val: null - value: false diff --git a/custom_components/tuya_local/devices/moebot_s_mower.yaml b/custom_components/tuya_local/devices/moebot_s_mower.yaml index 5f63e47835..99c59dbeb8 100644 --- a/custom_components/tuya_local/devices/moebot_s_mower.yaml +++ b/custom_components/tuya_local/devices/moebot_s_mower.yaml @@ -84,49 +84,6 @@ primary_entity: name: zones optional: true secondary_entities: - - entity: vacuum - icon: "mdi:robot-mower" - deprecated: lawn_mower - dps: - - id: 101 - name: status - type: string - mapping: - - dps_val: STANDBY - value: standby - - dps_val: MOWING - value: mowing - - dps_val: CHARGING - value: charging - - dps_val: EMERGENCY - value: manually stopped - - dps_val: LOCKED - value: locked - - dps_val: PAUSED - value: paused - - dps_val: PARK - value: returning - - dps_val: CHARGING_WITH_TASK_SUSPEND - value: charging - - dps_val: FIXED_MOWING - value: spot mowing - - dps_val: ERROR - value: error - - id: 115 - name: command - type: string - optional: true - mapping: - - dps_val: StartMowing - value: start - - dps_val: StartFixedMowing - value: clean_spot - - dps_val: PauseWork - value: pause - - dps_val: CancelWork - value: stop - - dps_val: StartReturnStation - value: return_to_base - entity: button name: Start fixed mowing icon: "mdi:mower-on" diff --git a/custom_components/tuya_local/devices/pir_spotlight.yaml b/custom_components/tuya_local/devices/pir_spotlight.yaml index bebcafd6a5..d19dad0e73 100644 --- a/custom_components/tuya_local/devices/pir_spotlight.yaml +++ b/custom_components/tuya_local/devices/pir_spotlight.yaml @@ -81,18 +81,6 @@ secondary_entities: value: detected - dps_val: none value: clear - - entity: binary_sensor - class: motion - deprecated: event_motion - dps: - - id: 52 - type: string - name: sensor - mapping: - - dps_val: "pir" - value: true - - value: false - optional: true - entity: select name: Motion distance category: config diff --git a/custom_components/tuya_local/devices/poolex_q7_heatpump.yaml b/custom_components/tuya_local/devices/poolex_q7_heatpump.yaml index 669c5a6cd9..1c5dc7fc2c 100644 --- a/custom_components/tuya_local/devices/poolex_q7_heatpump.yaml +++ b/custom_components/tuya_local/devices/poolex_q7_heatpump.yaml @@ -106,62 +106,6 @@ primary_entity: type: integer name: unknown_21 secondary_entities: - - entity: water_heater - icon: "mdi:pool-thermometer" - deprecated: climate - category: config - dps: - - id: 1 - type: boolean - name: operation_mode - mapping: - - dps_val: false - value: "off" - - dps_val: true - value: heatpump - - id: 2 - type: integer - name: temperature - range: - min: 5 - max: 80 - mapping: - - constraint: temperature_unit - conditions: - - dps_val: f - range: - min: 41 - max: 176 - value_redirect: temp_set_f - - id: 3 - type: integer - name: current_temperature - mapping: - - constraint: temperature_unit - conditions: - - dps_val: f - value_redirect: temp_current_f - - id: 13 - type: string - name: temperature_unit - mapping: - - dps_val: c - value: C - - dps_val: f - value: F - - id: 14 - type: integer - name: temp_set_f - range: - min: 41 - max: 176 - hidden: true - optional: true - - id: 15 - type: integer - name: temp_current_f - hidden: true - optional: true - entity: select translation_key: temperature_unit category: config diff --git a/custom_components/tuya_local/devices/rl_video_lock.yaml b/custom_components/tuya_local/devices/rl_video_lock.yaml index 2e74139f8b..b6d54aab81 100644 --- a/custom_components/tuya_local/devices/rl_video_lock.yaml +++ b/custom_components/tuya_local/devices/rl_video_lock.yaml @@ -43,25 +43,3 @@ secondary_entities: - dps_val: "" value: null - value: ring - - entity: binary_sensor - name: Doorbell - deprecated: event_doorbell - class: sound - category: diagnostic - dps: - - id: 136 - type: string - name: sensor - optional: true - persist: false - mapping: - - dps_val: null - value: false - - dps_val: "" - value: false - - value: true - - id: 136 - type: string - name: details - optional: true - persist: false diff --git a/custom_components/tuya_local/devices/smardeer_lock33.yaml b/custom_components/tuya_local/devices/smardeer_lock33.yaml index 166c11917c..c7d8a555b9 100644 --- a/custom_components/tuya_local/devices/smardeer_lock33.yaml +++ b/custom_components/tuya_local/devices/smardeer_lock33.yaml @@ -97,13 +97,3 @@ secondary_entities: value: ring - dps_val: false value: null - - entity: binary_sensor - name: Doorbell - deprecated: event_doorbell - class: sound - category: diagnostic - dps: - - id: 19 - type: boolean - name: sensor - optional: true diff --git a/custom_components/tuya_local/devices/smart_siren_alarm.yaml b/custom_components/tuya_local/devices/smart_siren_alarm.yaml index fe8b0decf0..9b2bf9b963 100644 --- a/custom_components/tuya_local/devices/smart_siren_alarm.yaml +++ b/custom_components/tuya_local/devices/smart_siren_alarm.yaml @@ -237,17 +237,3 @@ secondary_entities: - dps_val: "ACA=" value: ring - value: null - - entity: binary_sensor - name: Doorbell push - deprecated: event_doorbell - category: diagnostic - icon: "mdi:crosshairs-question" - dps: - - id: 128 - type: string - name: sensor - optional: true - mapping: - - dps_val: "ACA=" - value: true - - value: false From 3d5db1c84fd71aa0f703755422df45ca9fa7ef87 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 18 Jul 2024 21:25:13 +0900 Subject: [PATCH 058/169] Lefant N3: make power dp optional Issue #1393 --- custom_components/tuya_local/devices/lefant_n3_vacuum.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/tuya_local/devices/lefant_n3_vacuum.yaml b/custom_components/tuya_local/devices/lefant_n3_vacuum.yaml index 435bcabf43..bf33537c8a 100644 --- a/custom_components/tuya_local/devices/lefant_n3_vacuum.yaml +++ b/custom_components/tuya_local/devices/lefant_n3_vacuum.yaml @@ -10,6 +10,7 @@ primary_entity: - id: 1 name: power type: boolean + optional: true - id: 2 name: activate type: boolean @@ -231,6 +232,7 @@ secondary_entities: - id: 1 type: boolean name: button + optional: true - entity: button name: Pause icon: "mdi:pause" From caf5001aeff82acd97d576ad7432f350ae660226 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 18 Jul 2024 23:03:20 +0900 Subject: [PATCH 059/169] New device template: make the log requirement more obvious It seems many users do not read instructions, then get confused by their requests being closed after they failed to provide logs. Put the note about logs being required earlier, so it is less likely to be overlooked. --- .github/ISSUE_TEMPLATE/new-device.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/new-device.md b/.github/ISSUE_TEMPLATE/new-device.md index cabbbebfd8..4e5e71e4d8 100644 --- a/.github/ISSUE_TEMPLATE/new-device.md +++ b/.github/ISSUE_TEMPLATE/new-device.md @@ -10,6 +10,9 @@ assignees: '' - -# Log Message - - -``` -Please paste logs here -``` - -# Information about DPS mappings - - -``` -Please paste the output here. -``` - - - - - -# Product ID - - - - -# Information about how the device functions - - diff --git a/.github/ISSUE_TEMPLATE/new-device.yaml b/.github/ISSUE_TEMPLATE/new-device.yaml new file mode 100644 index 0000000000..70df582cbd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/new-device.yaml @@ -0,0 +1,67 @@ +name: New Device +description: Report an unsupported device +title: Request support for +labels: ["new device"] +body: + - type: markdown + attributes: + value: | + This form is for reporting a **New Device**. If you are looking for + general help, including cases where you do not see anything in the log, + see [Discussions](https://github.com/make-all/tuya-local/discussions). + + Thank you for reporting your unsupported device. Please provide as + much information as you can. Because the developers are busy, new + device requests will be prioritised as follows: + + 1. Pull requests + 2. Issues with logs and QueryThingsDataModel API results or equivalent + 3. Issues with logs and enough dps info to make a useful config. + 4. Issues with logs and a tested config + + - type: textarea + id: log + attributes: + label: Log message + description: | + Please paste the Warning level log message containing a dps list + which is output when you attempt to add the device and are presented + with a list of non-matching devices. + placeholder: Reports without logs will be immediately closed + render: json + validations: + required: true + - type: textarea + id: data_model + attributes: + label: DPS information + description: | + Preferred data is QueryThingsDataModel API result from iot.tuya.com + If you do not have access to iot.tuya.com, but have other ways of + obtaining dps information, the minimum info required is the numeric + dp id, name/description, data type, and for settable dps, the range + for numeric dps, and the list of possible values for enum dps. + render: text + validations: + required: true + - type: input + id: productid + attributes: + label: Product ID + description: | + The product ID or productKey for the device. You can get this + from the same iot.tuya.com API functions that provide the local key + or from `tinytuya scan` or other tools doing local discovery + - type: input + id: productname + attributes: + label: Product Name + description: The product name (usually brand and model name/number) + - type: textarea + id: info + attributes: + label: Information about how the device functions + description: | + Put any additional information here. Remember the developers are not + familiar with your device, so any explanations of how it functions, + links to manuals or even marketing webpages are useful. From 45cfd5739ebc4608166160288843683bc9ebb487 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Fri, 19 Jul 2024 00:08:05 +0900 Subject: [PATCH 061/169] New device template: don't format log as json Only part of the log is json, so it will be marked as syntax error. --- .github/ISSUE_TEMPLATE/new-device.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/new-device.yaml b/.github/ISSUE_TEMPLATE/new-device.yaml index 70df582cbd..554950e774 100644 --- a/.github/ISSUE_TEMPLATE/new-device.yaml +++ b/.github/ISSUE_TEMPLATE/new-device.yaml @@ -28,7 +28,7 @@ body: which is output when you attempt to add the device and are presented with a list of non-matching devices. placeholder: Reports without logs will be immediately closed - render: json + render: text validations: required: true - type: textarea From 12f5c52646602a9d13eedea536cb2470c78cfb2a Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 20 Jul 2024 09:33:05 +0900 Subject: [PATCH 062/169] YL01 water tester: scale Chlorine readings by 10 Tuya app reports 0.5 when we are reporting 5 for this. Issue #2056 --- custom_components/tuya_local/devices/ble_yl01_watertester.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/tuya_local/devices/ble_yl01_watertester.yaml b/custom_components/tuya_local/devices/ble_yl01_watertester.yaml index d8ab92e888..9955c260f1 100644 --- a/custom_components/tuya_local/devices/ble_yl01_watertester.yaml +++ b/custom_components/tuya_local/devices/ble_yl01_watertester.yaml @@ -65,6 +65,8 @@ secondary_entities: name: sensor unit: mg/L class: measurement + mapping: + - scale: 10 - entity: select name: pH buffer standard icon: "mdi:ph" From c3a8a7685c67893617d7a983f4a49d582fdadff8 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 20 Jul 2024 09:40:40 +0900 Subject: [PATCH 063/169] light: fix incorect device reference when turning off effects Issue #2135 --- custom_components/tuya_local/light.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/light.py b/custom_components/tuya_local/light.py index 50a66f48d8..4d12d89391 100644 --- a/custom_components/tuya_local/light.py +++ b/custom_components/tuya_local/light.py @@ -357,7 +357,7 @@ async def async_turn_on(self, **params): # effect, use the default, or first in the list effect = ( self._color_mode_dps.default - or self._color_mode_dps.values(self.device)[0] + or self._color_mode_dps.values(self._device)[0] ) _LOGGER.debug( "Emulating effect using color mode of %s", From b7920f68d877ed0808c261060d25be5734d1d393 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 20 Jul 2024 10:55:30 +0900 Subject: [PATCH 064/169] Moebot tests: remove tests for vacuum --- tests/devices/test_moebot.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/tests/devices/test_moebot.py b/tests/devices/test_moebot.py index e713b17038..c148b3bfab 100644 --- a/tests/devices/test_moebot.py +++ b/tests/devices/test_moebot.py @@ -8,7 +8,6 @@ LawnMowerActivity, LawnMowerEntityFeature, ) -from homeassistant.components.vacuum import VacuumEntityFeature from ..const import MOEBOT_PAYLOAD from ..helpers import assert_device_properties_set @@ -37,7 +36,6 @@ class TestMoebot(TuyaDeviceTestCase): def setUp(self): self.setUpForConfig("moebot_s_mower.yaml", MOEBOT_PAYLOAD) - self.subject = self.entities.get("vacuum") self.mower = self.entities.get("lawn_mower") self.mark_secondary( [ @@ -54,19 +52,6 @@ def setUp(self): ) def test_supported_features(self): - self.assertEqual( - self.subject.supported_features, - ( - VacuumEntityFeature.CLEAN_SPOT - | VacuumEntityFeature.PAUSE - | VacuumEntityFeature.RETURN_HOME - | VacuumEntityFeature.SEND_COMMAND - | VacuumEntityFeature.START - | VacuumEntityFeature.STATE - | VacuumEntityFeature.STATUS - | VacuumEntityFeature.STOP - ), - ) self.assertEqual( self.mower.supported_features, ( @@ -76,13 +61,6 @@ def test_supported_features(self): ), ) - async def test_async_stop(self): - async with assert_device_properties_set( - self.subject._device, - {COMMAND_DP: "CancelWork"}, - ): - await self.subject.async_stop() - def test_lawnmower_activity(self): self.dps[STATUS_DP] = "ERROR" self.assertEqual(self.mower.activity, LawnMowerActivity.ERROR) From 53ca03cbeaf0ab24c22177c988ed669e93bdd8e3 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 20 Jul 2024 17:12:23 +0900 Subject: [PATCH 065/169] Update tinytuya to 1.15.1 --- custom_components/tuya_local/manifest.json | 5 +++-- requirements-dev.txt | 2 +- requirements.txt | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/tuya_local/manifest.json b/custom_components/tuya_local/manifest.json index 8d57c90174..8caf23a5ee 100644 --- a/custom_components/tuya_local/manifest.json +++ b/custom_components/tuya_local/manifest.json @@ -1,4 +1,5 @@ { + "domain": "tuya_local", "name": "Tuya Local", "codeowners": [ @@ -11,8 +12,8 @@ "iot_class": "local_push", "issue_tracker": "https://github.com/make-all/tuya-local/issues", "requirements": [ - "tinytuya==1.15.0", + "tinytuya==1.15.1", "tuya-device-sharing-sdk>=0.1.9,<=0.2.99" ], - "version": "2024.7.0" + "version": "2024.7.1" } diff --git a/requirements-dev.txt b/requirements-dev.txt index 49e62600a1..fc9db0b529 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,6 +5,6 @@ pytest pytest-asyncio pytest-cov ruff -tinytuya~=1.15.0 +tinytuya~=1.15.1 tuya-device-sharing-sdk>=0.1.9,<=0.2.99 yamllint diff --git a/requirements.txt b/requirements.txt index 7c73d6187a..44e582e895 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,2 @@ -tinytuya~=1.15.0 +tinytuya~=1.15.1 tuya-device-sharing-sdk>=0.1.9,<=0.2.99 -x From a345b6240cef302217257e428576f4849784118a Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 20 Jul 2024 18:35:25 +0900 Subject: [PATCH 066/169] WOUEJ EV chrger: make charger temperature optional Issue #2133 --- custom_components/tuya_local/devices/wouej_evcharger.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/tuya_local/devices/wouej_evcharger.yaml b/custom_components/tuya_local/devices/wouej_evcharger.yaml index caf7e241e2..8eec0b38d8 100644 --- a/custom_components/tuya_local/devices/wouej_evcharger.yaml +++ b/custom_components/tuya_local/devices/wouej_evcharger.yaml @@ -122,11 +122,13 @@ secondary_entities: dps: - id: 105 type: integer + optional: true name: sensor unit: C class: measurement mapping: - scale: 10 + - dps_val: null - entity: select translation_key: temperature_unit category: config From 3fa9e041f3b48a3b8ca0460b48b8aabd79c780cf Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 20 Jul 2024 19:56:40 +0900 Subject: [PATCH 067/169] device: enumerate matching configs in an executor. As this involves filesystem interaction, HA now complains about this. Issue #2133 --- custom_components/tuya_local/device.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom_components/tuya_local/device.py b/custom_components/tuya_local/device.py index 58a99c34e3..18a8debdb3 100644 --- a/custom_components/tuya_local/device.py +++ b/custom_components/tuya_local/device.py @@ -357,7 +357,11 @@ async def async_possible_types(self): await self.async_refresh() cached_state = self._get_cached_state() - for match in possible_matches(cached_state): + possible = await self._hass.async_add_executor_job( + possible_matches, + cached_state, + ) + for match in possible: yield match async def async_inferred_type(self): From 905e48fdec74b46ca1d15f179cb9d90119b77e73 Mon Sep 17 00:00:00 2001 From: Jianyun Date: Mon, 15 Jul 2024 22:01:34 +0800 Subject: [PATCH 068/169] Add chinese translation for Casdon TD Pro 2 --- .../tuya_local/devices/casdon_td_pro_2.yaml | 36 ++++++------ .../tuya_local/translations/en.json | 58 +++++++++++++++++++ .../tuya_local/translations/zh-Hans.json | 58 +++++++++++++++++++ 3 files changed, 135 insertions(+), 17 deletions(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index 8470ea05bb..712e19c0fd 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -4,6 +4,7 @@ products: name: Casdon TD Pro 2 primary_entity: entity: climate + translation_only_key: casdon_oven dps: - id: 1 name: hvac_mode @@ -146,6 +147,7 @@ secondary_entities: - entity: binary_sensor category: diagnostic class: problem + translation_key: casdon_oven_fault dps: - id: 13 type: bitfield @@ -158,29 +160,29 @@ secondary_entities: type: bitfield name: fault_message mapping: - - value: OK + - value: "OK" - dps_val: 0 - value: OK + value: "OK" - dps_val: 1 - value: "E1: Chamber overheat protection (exceeds 290°C)" + value: "E1" - dps_val: 2 - value: "E2: Evaporation tray overheat protection (exceeds 200°C)" + value: "E2" - dps_val: 4 - value: "E3: Chamber low temperature protection (below 35°C)" + value: "E3" - dps_val: 8 - value: "E4: Evaporation tray low temp protection (below 35°C)" + value: "E4" - dps_val: 16 - value: "E5: Sensor connection error (Open circuit)" + value: "E5" - dps_val: 32 - value: "E6: Sensor malfunction (Short circuit)" + value: "E6" - dps_val: 64 - value: "E7: Display board communication error" + value: "E7" - dps_val: 128 - value: "E8: Water tank open (CN7) or Evaporation tray dry (CN3)" + value: "E8" - entity: sensor - name: Status class: enum + translation_key: cooking_status dps: - id: 102 name: sensor @@ -188,17 +190,17 @@ secondary_entities: readonly: true mapping: - dps_val: wait - value: Waiting for Cooking + value: wait - dps_val: reservation - value: In Reservation + value: reservation - dps_val: cooking - value: In Progress + value: cooking - dps_val: cancel - value: Cooking Canceled + value: cancel - dps_val: done - value: Cooking Completed + value: done - dps_val: pause - value: Cooking Paused + value: pause - entity: light dps: - id: 103 diff --git a/custom_components/tuya_local/translations/en.json b/custom_components/tuya_local/translations/en.json index 5abd86fa87..9314f21e99 100644 --- a/custom_components/tuya_local/translations/en.json +++ b/custom_components/tuya_local/translations/en.json @@ -121,6 +121,22 @@ "off": "OK", "on": "Full" } + }, + "casdon_oven_fault": { + "state_attributes": { + "fault_message": { + "state": { + "E1": "E1: Chamber overheat protection (exceeds 290°C)", + "E2": "E2: Evaporation tray overheat protection (exceeds 200°C)", + "E3": "E3: Chamber low temperature protection (below 35°C)", + "E4": "E4: Evaporation tray low temperature protection (below 35°C)", + "E5": "E5: Sensor connection error (Open circuit)", + "E6": "E6: Sensor malfunction (Short circuit)", + "E7": "E7: Display board communication error", + "E8": "E8: Water tank open (CN7) or Evaporation tray dry (CN3)" + } + } + } } }, "climate": { @@ -215,6 +231,37 @@ } } } + }, + "casdon_oven": { + "state_attributes": { + "preset_mode": { + "state": { + "Healthy Steam": "Healthy Steam", + "Fresh Steam": "Fresh Steam", + "High Temp Steam": "High Temp Steam", + "Stew": "Stew", + "Bake up and down": "Bake up and down", + "BBQ": "BBQ", + "Bottom Hot Air": "Bottom Hot Air", + "On Strong Roast": "On Strong Roast", + "3D Hot Air": "3D Hot Air", + "Air Fry": "Air Fry", + "Steam Frying": "Steam Frying", + "One-click Bread": "One-click Bread", + "Quick Heat": "Quick Heat", + "Keep Warm": "Keep Warm", + "Unfreeze": "Unfreeze", + "Fermentation": "Fermentation", + "Descale": "Descale", + "Local Recipes": "Local Recipes", + "Drying": "Drying", + "Custom": "Custom", + "Low Steaming": "Low Steaming", + "Medium Steaming": "Medium Steaming", + "High Steaming": "High Steaming" + } + } + } } }, "humidifier": { @@ -313,6 +360,17 @@ "sensor": { "time_remaining": { "name": "Time remaining" + }, + "cooking_status": { + "name": "Status", + "state": { + "wait": "Waiting for Cooking", + "reservation": "In Reservation", + "cooking": "In Progress", + "cancel": "Cooking Canceled", + "done": "Cooking Completed", + "pause": "Cooking Paused" + } } }, "switch": { diff --git a/custom_components/tuya_local/translations/zh-Hans.json b/custom_components/tuya_local/translations/zh-Hans.json index 5905d5e69c..a432a7015a 100644 --- a/custom_components/tuya_local/translations/zh-Hans.json +++ b/custom_components/tuya_local/translations/zh-Hans.json @@ -121,6 +121,22 @@ "off": "正常", "on": "满水" } + }, + "casdon_oven_fault": { + "state_attributes": { + "fault_message": { + "state": { + "E1": "E1:腔体高温保护(腔体传感器温度高于290°C)", + "E2": "E2:蒸发盘高温保护(蒸发盘传感器温度高于200°C)", + "E3": "E3:腔体低温保护(连续工作5分钟温度低于35°C)", + "E4": "E4:蒸发盘低温保护(连续工作5分钟温度低于35°C)", + "E5": "E5:传感器连接出故障(腔体或蒸发盘传感器开路)", + "E6": "E6:传感器感应出故障(腔体或蒸发盘传感器短路)", + "E7": "E7:显示板通信故障", + "E8": "E8:水箱开关(CN7)未闭合或者蒸发盘NTC(CN3)温度高于125℃并持续时间达25s后,缺水提示,并停止工作。" + } + } + } } }, "climate": { @@ -215,6 +231,37 @@ } } } + }, + "casdon_oven": { + "state_attributes": { + "preset_mode": { + "state": { + "Healthy Steam": "健康蒸", + "Fresh Steam": "鲜嫩蒸", + "High Temp Steam": "高温蒸", + "Stew": "养生炖", + "Bake up and down": "上下烤", + "BBQ": "立体烧烤", + "Bottom Hot Air": "底部热风", + "On Strong Roast": "上强烤", + "3D Hot Air": "3D热风", + "Air Fry": "空气炸", + "Steam Frying": "蒸汽炸", + "One-click Bread": "一键面包", + "Quick Heat": "速热", + "Keep Warm": "保温", + "Unfreeze": "解冻", + "Fermentation": "发酵", + "Descale": "除垢", + "Local Recipes": "菜谱模式", + "Drying": "内腔烘干", + "Custom": "自定义模式", + "Low Steaming": "低湿蒸烤", + "Medium Steaming": "中湿蒸烤", + "High Steaming": "高湿蒸烤" + } + } + } } }, "humidifier": { @@ -313,6 +360,17 @@ "sensor": { "time_remaining": { "name": "剩余时间" + }, + "cooking_status": { + "name" : "烹饪状态", + "state": { + "wait": "烹饪等待", + "reservation": "预约中", + "cooking": "烹饪中", + "cancel": "烹饪取消", + "done": "烹饪完成", + "pause": "烹饪暂停" + } } }, "switch": { From 58cc59d5a0477d8eb3600a48c7fe34efd771d6f4 Mon Sep 17 00:00:00 2001 From: Jianyun Date: Mon, 15 Jul 2024 22:14:27 +0800 Subject: [PATCH 069/169] Casdon TD Pro 2: fix translation key --- .../tuya_local/devices/casdon_td_pro_2.yaml | 16 ++++++++-------- .../tuya_local/translations/en.json | 16 ++++++++-------- .../tuya_local/translations/zh-Hans.json | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index 712e19c0fd..f737d297bb 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -164,21 +164,21 @@ secondary_entities: - dps_val: 0 value: "OK" - dps_val: 1 - value: "E1" + value: "e1" - dps_val: 2 - value: "E2" + value: "e2" - dps_val: 4 - value: "E3" + value: "e3" - dps_val: 8 - value: "E4" + value: "e4" - dps_val: 16 - value: "E5" + value: "e5" - dps_val: 32 - value: "E6" + value: "e6" - dps_val: 64 - value: "E7" + value: "e7" - dps_val: 128 - value: "E8" + value: "e8" - entity: sensor class: enum diff --git a/custom_components/tuya_local/translations/en.json b/custom_components/tuya_local/translations/en.json index 9314f21e99..650de89a93 100644 --- a/custom_components/tuya_local/translations/en.json +++ b/custom_components/tuya_local/translations/en.json @@ -126,14 +126,14 @@ "state_attributes": { "fault_message": { "state": { - "E1": "E1: Chamber overheat protection (exceeds 290°C)", - "E2": "E2: Evaporation tray overheat protection (exceeds 200°C)", - "E3": "E3: Chamber low temperature protection (below 35°C)", - "E4": "E4: Evaporation tray low temperature protection (below 35°C)", - "E5": "E5: Sensor connection error (Open circuit)", - "E6": "E6: Sensor malfunction (Short circuit)", - "E7": "E7: Display board communication error", - "E8": "E8: Water tank open (CN7) or Evaporation tray dry (CN3)" + "e1": "E1: Chamber overheat protection (exceeds 290°C)", + "e2": "E2: Evaporation tray overheat protection (exceeds 200°C)", + "e3": "E3: Chamber low temperature protection (below 35°C)", + "e4": "E4: Evaporation tray low temperature protection (below 35°C)", + "e5": "E5: Sensor connection error (Open circuit)", + "e6": "E6: Sensor malfunction (Short circuit)", + "e7": "E7: Display board communication error", + "e8": "E8: Water tank open (CN7) or Evaporation tray dry (CN3)" } } } diff --git a/custom_components/tuya_local/translations/zh-Hans.json b/custom_components/tuya_local/translations/zh-Hans.json index a432a7015a..84ab2a6cd8 100644 --- a/custom_components/tuya_local/translations/zh-Hans.json +++ b/custom_components/tuya_local/translations/zh-Hans.json @@ -126,14 +126,14 @@ "state_attributes": { "fault_message": { "state": { - "E1": "E1:腔体高温保护(腔体传感器温度高于290°C)", - "E2": "E2:蒸发盘高温保护(蒸发盘传感器温度高于200°C)", - "E3": "E3:腔体低温保护(连续工作5分钟温度低于35°C)", - "E4": "E4:蒸发盘低温保护(连续工作5分钟温度低于35°C)", - "E5": "E5:传感器连接出故障(腔体或蒸发盘传感器开路)", - "E6": "E6:传感器感应出故障(腔体或蒸发盘传感器短路)", - "E7": "E7:显示板通信故障", - "E8": "E8:水箱开关(CN7)未闭合或者蒸发盘NTC(CN3)温度高于125℃并持续时间达25s后,缺水提示,并停止工作。" + "e1": "E1:腔体高温保护(腔体传感器温度高于290°C)", + "e2": "E2:蒸发盘高温保护(蒸发盘传感器温度高于200°C)", + "e3": "E3:腔体低温保护(连续工作5分钟温度低于35°C)", + "e4": "E4:蒸发盘低温保护(连续工作5分钟温度低于35°C)", + "e5": "E5:传感器连接出故障(腔体或蒸发盘传感器开路)", + "e6": "E6:传感器感应出故障(腔体或蒸发盘传感器短路)", + "e7": "E7:显示板通信故障", + "e8": "E8:水箱开关(CN7)未闭合或者蒸发盘NTC(CN3)温度高于125℃并持续时间达25s后,缺水提示,并停止工作。" } } } From 57520383c982bf2b18953f64a97558a1eb87035e Mon Sep 17 00:00:00 2001 From: Jianyun Date: Mon, 15 Jul 2024 22:29:49 +0800 Subject: [PATCH 070/169] Casdon TD Pro 2: fix translation key --- .../tuya_local/devices/casdon_td_pro_2.yaml | 46 +++++++++--------- .../tuya_local/translations/en.json | 46 +++++++++--------- .../tuya_local/translations/zh-Hans.json | 48 +++++++++---------- 3 files changed, 70 insertions(+), 70 deletions(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index f737d297bb..c35244af8e 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -31,51 +31,51 @@ primary_entity: type: string mapping: - dps_val: "1" - value: Healthy Steam + value: healthy_steam - dps_val: "2" - value: Fresh Steam + value: fresh_steam - dps_val: "3" - value: High Temp Steam + value: high_temp_steam - dps_val: "4" - value: Stew + value: stew - dps_val: "5" - value: Bake up and down + value: bake_up_and_down - dps_val: "6" - value: BBQ + value: bbq - dps_val: "7" - value: Bottom Hot Air + value: bottom_hot_air - dps_val: "8" - value: On Strong Roast + value: on_strong_roast - dps_val: "9" - value: 3D Hot Air + value: 3d_hot_air - dps_val: "10" - value: Air Fry + value: air_fry - dps_val: "11" - value: Steam Frying + value: steam_frying - dps_val: "12" - value: One-click Bread + value: one_click_bread - dps_val: "13" - value: Quick Heat + value: quick_heat - dps_val: "14" - value: Keep Warm + value: keep_warm - dps_val: "15" - value: Unfreeze + value: unfreeze - dps_val: "16" - value: Fermentation + value: fermentation - dps_val: "17" - value: Descale + value: descale - dps_val: "18" - value: Local Recipes + value: local_recipes - dps_val: "19" - value: Drying + value: drying - dps_val: "20" - value: Custom + value: custom - dps_val: "21" - value: Low Steaming + value: low_steaming - dps_val: "22" - value: Medium Steaming + value: medium_steaming - dps_val: "23" - value: High Steaming + value: high_steaming - id: 102 type: string name: hvac_action diff --git a/custom_components/tuya_local/translations/en.json b/custom_components/tuya_local/translations/en.json index 650de89a93..4e631d90a5 100644 --- a/custom_components/tuya_local/translations/en.json +++ b/custom_components/tuya_local/translations/en.json @@ -236,29 +236,29 @@ "state_attributes": { "preset_mode": { "state": { - "Healthy Steam": "Healthy Steam", - "Fresh Steam": "Fresh Steam", - "High Temp Steam": "High Temp Steam", - "Stew": "Stew", - "Bake up and down": "Bake up and down", - "BBQ": "BBQ", - "Bottom Hot Air": "Bottom Hot Air", - "On Strong Roast": "On Strong Roast", - "3D Hot Air": "3D Hot Air", - "Air Fry": "Air Fry", - "Steam Frying": "Steam Frying", - "One-click Bread": "One-click Bread", - "Quick Heat": "Quick Heat", - "Keep Warm": "Keep Warm", - "Unfreeze": "Unfreeze", - "Fermentation": "Fermentation", - "Descale": "Descale", - "Local Recipes": "Local Recipes", - "Drying": "Drying", - "Custom": "Custom", - "Low Steaming": "Low Steaming", - "Medium Steaming": "Medium Steaming", - "High Steaming": "High Steaming" + "healthy_steam": "Healthy Steam", + "fresh_steam": "Fresh Steam", + "high_temp_steam": "High Temp Steam", + "stew": "Stew", + "bake_up_and_down": "Bake up and down", + "bbq": "BBQ", + "bottom_hot_air": "Bottom Hot Air", + "on_strong_roast": "On Strong Roast", + "3d_hot_air": "3D Hot Air", + "air_fry": "Air Fry", + "steam_frying": "Steam Frying", + "one_click_bread": "One-click Bread", + "quick_heat": "Quick Heat", + "keep_warm": "Keep Warm", + "unfreeze": "Unfreeze", + "fermentation": "Fermentation", + "descale": "Descale", + "local_recipes": "Local Recipes", + "drying": "Drying", + "custom": "Custom", + "low_steaming": "Low Steaming", + "medium_steaming": "Medium Steaming", + "high_steaming": "High Steaming" } } } diff --git a/custom_components/tuya_local/translations/zh-Hans.json b/custom_components/tuya_local/translations/zh-Hans.json index 84ab2a6cd8..50db799c8b 100644 --- a/custom_components/tuya_local/translations/zh-Hans.json +++ b/custom_components/tuya_local/translations/zh-Hans.json @@ -236,29 +236,29 @@ "state_attributes": { "preset_mode": { "state": { - "Healthy Steam": "健康蒸", - "Fresh Steam": "鲜嫩蒸", - "High Temp Steam": "高温蒸", - "Stew": "养生炖", - "Bake up and down": "上下烤", - "BBQ": "立体烧烤", - "Bottom Hot Air": "底部热风", - "On Strong Roast": "上强烤", - "3D Hot Air": "3D热风", - "Air Fry": "空气炸", - "Steam Frying": "蒸汽炸", - "One-click Bread": "一键面包", - "Quick Heat": "速热", - "Keep Warm": "保温", - "Unfreeze": "解冻", - "Fermentation": "发酵", - "Descale": "除垢", - "Local Recipes": "菜谱模式", - "Drying": "内腔烘干", - "Custom": "自定义模式", - "Low Steaming": "低湿蒸烤", - "Medium Steaming": "中湿蒸烤", - "High Steaming": "高湿蒸烤" + "healthy_steam": "健康蒸", + "fresh_steam": "鲜嫩蒸", + "high_temp_steam": "高温蒸", + "stew": "养生炖", + "bake_up_and_down": "上下烤", + "bbq": "立体烧烤", + "bottom_hot_air": "底部热风", + "on_strong_roast": "上强烤", + "3d_hot_air": "3D热风", + "air_fry": "空气炸", + "steam_frying": "蒸汽炸", + "one_click_bread": "一键面包", + "quick_heat": "速热", + "keep_warm": "保温", + "unfreeze": "解冻", + "fermentation": "发酵", + "descale": "除垢", + "local_recipes": "菜谱模式", + "drying": "内腔烘干", + "custom": "自定义模式", + "low_steaming": "低湿蒸烤", + "medium_steaming": "中湿蒸烤", + "high_steaming": "高湿蒸烤" } } } @@ -362,7 +362,7 @@ "name": "剩余时间" }, "cooking_status": { - "name" : "烹饪状态", + "name": "烹饪状态", "state": { "wait": "烹饪等待", "reservation": "预约中", From c7beaccea9f41716cc81ed203bbb931f6c2dedc2 Mon Sep 17 00:00:00 2001 From: Jianyun Date: Thu, 18 Jul 2024 09:50:37 +0800 Subject: [PATCH 071/169] Fix translation key for Casdon TD Pro 2 --- custom_components/tuya_local/devices/casdon_td_pro_2.yaml | 2 +- custom_components/tuya_local/icons.json | 3 +++ custom_components/tuya_local/translations/en.json | 2 +- custom_components/tuya_local/translations/zh-Hans.json | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index c35244af8e..056458f00c 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -4,7 +4,7 @@ products: name: Casdon TD Pro 2 primary_entity: entity: climate - translation_only_key: casdon_oven + translation_only_key: oven dps: - id: 1 name: hvac_mode diff --git a/custom_components/tuya_local/icons.json b/custom_components/tuya_local/icons.json index 39bfeba8ff..63a493f758 100644 --- a/custom_components/tuya_local/icons.json +++ b/custom_components/tuya_local/icons.json @@ -26,6 +26,9 @@ "state": { "off": "mdi:radiator-off" } + }, + "oven": { + "default": "mdi:stove" } }, "fan": { diff --git a/custom_components/tuya_local/translations/en.json b/custom_components/tuya_local/translations/en.json index 4e631d90a5..0525206f9b 100644 --- a/custom_components/tuya_local/translations/en.json +++ b/custom_components/tuya_local/translations/en.json @@ -232,7 +232,7 @@ } } }, - "casdon_oven": { + "oven": { "state_attributes": { "preset_mode": { "state": { diff --git a/custom_components/tuya_local/translations/zh-Hans.json b/custom_components/tuya_local/translations/zh-Hans.json index 50db799c8b..d343187b85 100644 --- a/custom_components/tuya_local/translations/zh-Hans.json +++ b/custom_components/tuya_local/translations/zh-Hans.json @@ -232,7 +232,7 @@ } } }, - "casdon_oven": { + "oven": { "state_attributes": { "preset_mode": { "state": { From 8166a395e53285af7359b327a2b6b557f99e7bb1 Mon Sep 17 00:00:00 2001 From: gkwok1 <51801924+gkwok1@users.noreply.github.com> Date: Sat, 20 Jul 2024 17:21:49 -0400 Subject: [PATCH 072/169] Updated optional dps --- custom_components/tuya_local/devices/ble_pulido_p13_lock.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/custom_components/tuya_local/devices/ble_pulido_p13_lock.yaml b/custom_components/tuya_local/devices/ble_pulido_p13_lock.yaml index cf7723c63b..f3b94b0b49 100644 --- a/custom_components/tuya_local/devices/ble_pulido_p13_lock.yaml +++ b/custom_components/tuya_local/devices/ble_pulido_p13_lock.yaml @@ -126,6 +126,7 @@ secondary_entities: - id: 26 type: string name: option + optional: true mapping: - dps_val: 5s value: 5s @@ -189,6 +190,7 @@ secondary_entities: name: sensor unit: "%" class: measurement + optional: true mapping: - dps_val: high value: 100 @@ -206,6 +208,7 @@ secondary_entities: - id: 28 type: string name: option + optional: true mapping: - dps_val: chinese_simplified value: 中文 From d4a2ac701beb1f9887d35af25fd68bcff13058c0 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 21 Jul 2024 15:45:08 +0900 Subject: [PATCH 073/169] Cover: position is considered unreliable, so lower its priority Use binary open state before considering position, as that is a feedback from the curtain, while position and action are the last commands sent and not guaranteed to update when the curtain is controlled outside of HA. Where devices have a position dp that does provide accurate feedback on current position, it should be duplicated in the config as both position and current_position. --- custom_components/tuya_local/cover.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/tuya_local/cover.py b/custom_components/tuya_local/cover.py index 91d29260fc..b7da510394 100644 --- a/custom_components/tuya_local/cover.py +++ b/custom_components/tuya_local/cover.py @@ -97,15 +97,15 @@ def current_cover_position(self): if pos is not None: return pos - if self._position_dp: - pos = self._position_dp.get_value(self._device) - return pos - if self._open_dp: state = self._open_dp.get_value(self._device) if state is not None: return 100 if state else 0 + if self._position_dp: + pos = self._position_dp.get_value(self._device) + return pos + if self._action_dp: state = self._action_dp.get_value(self._device) return self._state_to_percent(state) From ac9f9219dd0ddb3340e460ea365896ebf6284e26 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 21 Jul 2024 15:54:15 +0900 Subject: [PATCH 074/169] cover: modify the logic for considering a curtain opening or closing Only take control dp into account when we have enough other info to determine that the curtain is moving between states. Issue #2099 --- custom_components/tuya_local/cover.py | 57 +++++++++++---------------- 1 file changed, 24 insertions(+), 33 deletions(-) diff --git a/custom_components/tuya_local/cover.py b/custom_components/tuya_local/cover.py index b7da510394..8d132c1a07 100644 --- a/custom_components/tuya_local/cover.py +++ b/custom_components/tuya_local/cover.py @@ -102,14 +102,14 @@ def current_cover_position(self): if state is not None: return 100 if state else 0 - if self._position_dp: - pos = self._position_dp.get_value(self._device) - return pos - if self._action_dp: state = self._action_dp.get_value(self._device) return self._state_to_percent(state) + if self._position_dp: + pos = self._position_dp.get_value(self._device) + return pos + @property def _current_state(self): """Return the current state of the cover if it can be determined, @@ -120,37 +120,28 @@ def _current_state(self): if action in ["opening", "closing", "opened", "closed"]: return action - if self._currentpos_dp: - pos = self._currentpos_dp.get_value(self._device) - # we have a current pos dp, but it isn't telling us where the - # curtain is... we can't tell the state. - if pos is None: - return None - if pos < 5: - return "closed" - elif pos > 95: + pos = self.current_cover_position + if pos is None: + return None + if pos < 5: + return "closed" + elif pos > 95: + return "opened" + + if self._currentpos_dp and self._position_dp: + setpos = self._position_dp.get_value(self._device) + if setpos == pos: + # if the current position is around the set position, + # which is not closed, then we want is_closed to return + # false, so HA gets the full state from position. return "opened" - if self._position_dp: - setpos = self._position_dp.get_value(self._device) - if setpos == pos: - # if the current position is around the set position, - # which is not closed, then we want is_closed to return - # false, so HA gets the full state from position. - return "opened" - if self._control_dp: + + if self._control_dp: cmd = self._control_dp.get_value(self._device) - pos = self.current_cover_position - if pos is not None: - if cmd == "open": - if pos > 95: - return "opened" - else: - return "opening" - elif cmd == "close": - if pos < 5: - return "closed" - else: - return "closing" + if cmd == "open": + return "opening" + elif cmd == "close": + return "closing" @property def is_opening(self): From e566b4a1efccb9f60ddc8a7f4e76cb1d5247ecb0 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 21 Jul 2024 16:17:34 +0900 Subject: [PATCH 075/169] Docs for recent PRs. PR #2115 and #2138 --- ACKNOWLEDGEMENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index d99b31b995..38fdfa3d17 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -545,7 +545,7 @@ Further device support has been made with the assistance of users. Please consid - [gravy6](https://github.com/gravy6) for contributing support for Arlec smart buttons. - [rudironsonijr](https://github.com/rudironsonijr) for contributing support for NovaDigital SL-06 door locks. - [jan-gerard](https://github.com/jan-gerard) for contributing support for Eurom Sani towel rails. -- [gkwok1](https://github.com/gkwok1) for contributing support for Confortotal mini split air conditioners. +- [gkwok1](https://github.com/gkwok1) for contributing support for Confortotal mini split air conditioners and BLE Pulido P13 locks. - [hroussez](https://github.com/hroussez) for contributing ANWIO lightbulb compatibility info. - [bdraco](https://github.com/bdraco) for advice on correct use of HA threading/task functions. - [sj29fr](https://github.com/sj29fr) for contributing support for Stepuptech SG800 solar inverters. From b9e87efc04a671e4ecc0c839a012f0c18f53ba7c Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 21 Jul 2024 16:22:42 +0900 Subject: [PATCH 076/169] cover: fix indentation Issue #2099 --- custom_components/tuya_local/cover.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/tuya_local/cover.py b/custom_components/tuya_local/cover.py index 8d132c1a07..b47304b164 100644 --- a/custom_components/tuya_local/cover.py +++ b/custom_components/tuya_local/cover.py @@ -137,11 +137,11 @@ def _current_state(self): return "opened" if self._control_dp: - cmd = self._control_dp.get_value(self._device) - if cmd == "open": - return "opening" - elif cmd == "close": - return "closing" + cmd = self._control_dp.get_value(self._device) + if cmd == "open": + return "opening" + elif cmd == "close": + return "closing" @property def is_opening(self): From 4d2a303afc8419bcdec08c13c417896b8a4f8fe7 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 21 Jul 2024 16:47:56 +0900 Subject: [PATCH 077/169] Tests: update cover tests for new logic Garage door, QS01 curtain, simple blind cannot reliably determine opening and closing states, so update the tests for this. Issue #2099 --- tests/devices/test_garage_door_opener.py | 4 ++-- tests/devices/test_qs_c01_curtain.py | 12 ++++++------ tests/devices/test_simple_blinds.py | 14 +++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/devices/test_garage_door_opener.py b/tests/devices/test_garage_door_opener.py index 555598aa7f..b6f4751d75 100644 --- a/tests/devices/test_garage_door_opener.py +++ b/tests/devices/test_garage_door_opener.py @@ -41,14 +41,14 @@ def test_is_opening(self): self.dps[SWITCH_DPS] = True self.assertFalse(self.subject.is_opening) self.dps[OPEN_DPS] = False - self.assertTrue(self.subject.is_opening) + self.assertFalse(self.subject.is_opening) def test_is_closing(self): self.dps[SWITCH_DPS] = False self.dps[OPEN_DPS] = False self.assertFalse(self.subject.is_closing) self.dps[OPEN_DPS] = True - self.assertTrue(self.subject.is_closing) + self.assertFalse(self.subject.is_closing) self.dps[SWITCH_DPS] = True self.assertFalse(self.subject.is_closing) self.dps[OPEN_DPS] = False diff --git a/tests/devices/test_qs_c01_curtain.py b/tests/devices/test_qs_c01_curtain.py index caea5cd34d..e9b88119cb 100644 --- a/tests/devices/test_qs_c01_curtain.py +++ b/tests/devices/test_qs_c01_curtain.py @@ -61,22 +61,22 @@ def test_is_opening(self): self.dps[POSITION_DPS] = 100 self.assertFalse(self.subject.is_opening) self.dps[POSITION_DPS] = 50 - self.assertTrue(self.subject.is_opening) + self.assertIsNone(self.subject.is_opening) self.dps[COMMAND_DPS] = "close" - self.assertFalse(self.subject.is_opening) + self.assertIsNone(self.subject.is_opening) self.dps[COMMAND_DPS] = "stop" - self.assertFalse(self.subject.is_opening) + self.assertIsNone(self.subject.is_opening) def test_is_closing(self): self.dps[COMMAND_DPS] = "close" self.dps[POSITION_DPS] = 0 self.assertFalse(self.subject.is_closing) self.dps[POSITION_DPS] = 50 - self.assertTrue(self.subject.is_closing) + self.assertIsNone(self.subject.is_closing) self.dps[COMMAND_DPS] = "open" - self.assertFalse(self.subject.is_closing) + self.assertIsNone(self.subject.is_closing) self.dps[COMMAND_DPS] = "stop" - self.assertFalse(self.subject.is_closing) + self.assertIsNone(self.subject.is_closing) def test_is_closed(self): self.dps[COMMAND_DPS] = "close" diff --git a/tests/devices/test_simple_blinds.py b/tests/devices/test_simple_blinds.py index 572b53f9e2..1c872b7de1 100644 --- a/tests/devices/test_simple_blinds.py +++ b/tests/devices/test_simple_blinds.py @@ -42,22 +42,22 @@ def test_is_opening(self): self.dps[POSITION_DPS] = 0 self.assertFalse(self.subject.is_opening) self.dps[POSITION_DPS] = 50 - self.assertTrue(self.subject.is_opening) + self.assertIsNone(self.subject.is_opening) self.dps[COMMAND_DPS] = "close" - self.assertFalse(self.subject.is_opening) + self.assertIsNone(self.subject.is_opening) self.dps[COMMAND_DPS] = "stop" - self.assertFalse(self.subject.is_opening) + self.assertIsNone(self.subject.is_opening) def test_is_closing(self): self.dps[COMMAND_DPS] = "close" self.dps[POSITION_DPS] = 100 self.assertFalse(self.subject.is_closing) self.dps[POSITION_DPS] = 50 - self.assertTrue(self.subject.is_closing) + self.assertIsNone(self.subject.is_closing) self.dps[COMMAND_DPS] = "open" - self.assertFalse(self.subject.is_closing) + self.assertIsNone(self.subject.is_closing) self.dps[COMMAND_DPS] = "stop" - self.assertFalse(self.subject.is_closing) + self.assertIsNone(self.subject.is_closing) def test_is_closed(self): self.dps[COMMAND_DPS] = "close" @@ -66,7 +66,7 @@ def test_is_closed(self): self.dps[POSITION_DPS] = 100 self.assertTrue(self.subject.is_closed) self.dps[COMMAND_DPS] = "stop" - self.assertIsNone(self.subject.is_closed) + self.assertTrue(self.subject.is_closed) async def test_open_cover(self): async with assert_device_properties_set( From 34be756da705159d12e0a4f04beeeabfca2aa219 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 21 Jul 2024 20:30:24 +0900 Subject: [PATCH 078/169] Weeket kettle: make operation mode dp optional Issue #2140, potentially #1985 --- custom_components/tuya_local/devices/weeket_kettle.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/tuya_local/devices/weeket_kettle.yaml b/custom_components/tuya_local/devices/weeket_kettle.yaml index 8c6ce1e81b..8c28bd98ef 100644 --- a/custom_components/tuya_local/devices/weeket_kettle.yaml +++ b/custom_components/tuya_local/devices/weeket_kettle.yaml @@ -49,6 +49,7 @@ primary_entity: value: C - id: 16 type: string + optional: true name: operation_mode mapping: - dps_val: setting_quick From 42f0e9fb8e0a18884f739ab5e368b29ade662da9 Mon Sep 17 00:00:00 2001 From: piotrek2555 <82288345+piotrek2555@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:58:22 +0200 Subject: [PATCH 079/169] Update rotenso_ronix_heatpump.yaml Change range temperature from 16 to 31 --- .../tuya_local/devices/rotenso_ronix_heatpump.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/rotenso_ronix_heatpump.yaml b/custom_components/tuya_local/devices/rotenso_ronix_heatpump.yaml index a51bc6027d..c4ce2556ac 100644 --- a/custom_components/tuya_local/devices/rotenso_ronix_heatpump.yaml +++ b/custom_components/tuya_local/devices/rotenso_ronix_heatpump.yaml @@ -31,7 +31,7 @@ primary_entity: unit: C range: min: 160 - max: 880 + max: 310 mapping: - scale: 10 step: 10 From e20d4940f69081877f00ca6177a4d3a7cd70bfa5 Mon Sep 17 00:00:00 2001 From: Csongor Zalatnai Date: Mon, 22 Jul 2024 00:30:53 +0200 Subject: [PATCH 080/169] Added Leictory LK06 sprinkler controller & made the SH07 sprinkler controller device definiton support controllers with at least 4 zones --- .../tuya_local/devices/sh07_sprinkler_controller.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/custom_components/tuya_local/devices/sh07_sprinkler_controller.yaml b/custom_components/tuya_local/devices/sh07_sprinkler_controller.yaml index 6c6c891ab1..c5a5f93e2c 100644 --- a/custom_components/tuya_local/devices/sh07_sprinkler_controller.yaml +++ b/custom_components/tuya_local/devices/sh07_sprinkler_controller.yaml @@ -4,6 +4,8 @@ products: name: SH07-8 - id: mxh2sjigimo463mg name: Aquarobo SH07S-TY + - id: figmzixtki7bourh + name: Leictory LK06 primary_entity: entity: valve name: Valve 1 @@ -41,6 +43,7 @@ secondary_entities: - id: 105 name: valve type: boolean + optional: true - entity: valve name: Valve 6 class: water @@ -48,6 +51,7 @@ secondary_entities: - id: 106 name: valve type: boolean + optional: true - entity: valve name: Valve 7 class: water @@ -55,6 +59,7 @@ secondary_entities: - id: 110 name: valve type: boolean + optional: true - entity: valve name: Valve 8 class: water @@ -62,6 +67,7 @@ secondary_entities: - id: 111 name: valve type: boolean + optional: true - entity: sensor name: Weather class: enum From b7fc5322e60144f032ae799ad016f6328e8e0016 Mon Sep 17 00:00:00 2001 From: Ryoga85 <40725514+Ryoga85@users.noreply.github.com> Date: Sat, 20 Jul 2024 16:00:27 +0200 Subject: [PATCH 081/169] Add files via upload Added support for Klarstein Sky Scraper Ice Smart tower fan with air humidifier --- .../klarstein_skyscraper_ice_smart.yaml | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 custom_components/tuya_local/devices/klarstein_skyscraper_ice_smart.yaml diff --git a/custom_components/tuya_local/devices/klarstein_skyscraper_ice_smart.yaml b/custom_components/tuya_local/devices/klarstein_skyscraper_ice_smart.yaml new file mode 100644 index 0000000000..238d95ba9d --- /dev/null +++ b/custom_components/tuya_local/devices/klarstein_skyscraper_ice_smart.yaml @@ -0,0 +1,99 @@ +name: Klarstein Skyscraper Ice Smart +products: + - id: vklyfhpnd7a47iym +primary_entity: + entity: fan + translation_only_key: fan_with_presets + dps: + - id: 1 + name: switch + type: boolean + - id: 12 + name: countdown_left + type: integer +secondary_entities: + - entity: select + name: speed + icon: "mdi:speedometer" + category: config + dps: + - id: 2 + type: string + name: option + mapping: + - dps_val: "low" + value: "Niedrig" + - dps_val: "middle" + value: "Mittel" + - dps_val: "high" + value: "Hoch" + - entity: select + name: preset + category: config + dps: + - id: 3 + type: string + name: option + mapping: + - dps_val: "normal" + value: "Normal" + - dps_val: "nature" + value: "Natur" + - dps_val: "sleep" + value: "Schlaf" + - entity: switch + name: schwenken + icon: "mdi:arrow-oscillating" + category: config + dps: + - id: 10 + type: boolean + name: switch + - entity: select + translation_key: timer + category: config + dps: + - id: 11 + type: string + name: option + mapping: + - dps_val: cancel + value: "Aus" + - dps_val: "0_5h" + value: "0,5 Stunden" + - dps_val: "1h" + value: "1 Stunde" + - dps_val: "1_5h" + value: "1,5 Stunden" + - dps_val: "2h" + value: "2 Stunden" + - dps_val: "2_5h" + value: "2,5 Stunden" + - dps_val: "3h" + value: "3 Stunden" + - dps_val: "3_5h" + value: "3,5 Stunden" + - dps_val: "4h" + value: "4 Stunden" + - dps_val: "4_5h" + value: "4,5 Stunden" + - dps_val: "5h" + value: "5 Stunden" + - dps_val: "5_5h" + value: "5,5 Stunden" + - dps_val: "6h" + value: "6 Stunden" + - dps_val: "6_5h" + value: "6,5 Stunden" + - dps_val: "7h" + value: "7 Stunden" + - dps_val: "7_5h" + value: "7,5 Stunden" + - entity: switch + name: luftbefeuchter + icon: "mdi:air-humidifier" + category: config + dps: + - id: 15 + type: boolean + name: switch From 35906e923dba4ed6ebd1ef6c82d3b0e7e53d59e0 Mon Sep 17 00:00:00 2001 From: Ryoga85 <40725514+Ryoga85@users.noreply.github.com> Date: Sun, 21 Jul 2024 10:45:06 +0200 Subject: [PATCH 082/169] Update klarstein_skyscraper_ice_smart.yaml Made all the changes suggested except for the translations because I don't know how to do that. Everything's changed to English now. --- .../klarstein_skyscraper_ice_smart.yaml | 94 ++++++++----------- 1 file changed, 40 insertions(+), 54 deletions(-) diff --git a/custom_components/tuya_local/devices/klarstein_skyscraper_ice_smart.yaml b/custom_components/tuya_local/devices/klarstein_skyscraper_ice_smart.yaml index 238d95ba9d..d471bcf8e1 100644 --- a/custom_components/tuya_local/devices/klarstein_skyscraper_ice_smart.yaml +++ b/custom_components/tuya_local/devices/klarstein_skyscraper_ice_smart.yaml @@ -8,47 +8,33 @@ primary_entity: - id: 1 name: switch type: boolean + - id: 2 + type: string + name: speed + mapping: + - dps_val: "low" + value: 33 + - dps_val: "middle" + value: 66 + - dps_val: "high" + value: 100 + - id: 3 + type: string + name: preset_mode + mapping: + - dps_val: normal + value: normal + - dps_val: nature + value: nature + - dps_val: sleep + value: sleep + - id: 10 + type: boolean + name: oscillate - id: 12 name: countdown_left type: integer secondary_entities: - - entity: select - name: speed - icon: "mdi:speedometer" - category: config - dps: - - id: 2 - type: string - name: option - mapping: - - dps_val: "low" - value: "Niedrig" - - dps_val: "middle" - value: "Mittel" - - dps_val: "high" - value: "Hoch" - - entity: select - name: preset - category: config - dps: - - id: 3 - type: string - name: option - mapping: - - dps_val: "normal" - value: "Normal" - - dps_val: "nature" - value: "Natur" - - dps_val: "sleep" - value: "Schlaf" - - entity: switch - name: schwenken - icon: "mdi:arrow-oscillating" - category: config - dps: - - id: 10 - type: boolean - name: switch - entity: select translation_key: timer category: config @@ -58,39 +44,39 @@ secondary_entities: name: option mapping: - dps_val: cancel - value: "Aus" + value: "off" - dps_val: "0_5h" - value: "0,5 Stunden" + value: "0.5 hours" - dps_val: "1h" - value: "1 Stunde" + value: "1 hour" - dps_val: "1_5h" - value: "1,5 Stunden" + value: "1.5 hours" - dps_val: "2h" - value: "2 Stunden" + value: "2 hours" - dps_val: "2_5h" - value: "2,5 Stunden" + value: "2.5 hours" - dps_val: "3h" - value: "3 Stunden" + value: "3 hours" - dps_val: "3_5h" - value: "3,5 Stunden" + value: "3.5 hours" - dps_val: "4h" - value: "4 Stunden" + value: "4 hours" - dps_val: "4_5h" - value: "4,5 Stunden" + value: "4.5 hours" - dps_val: "5h" - value: "5 Stunden" + value: "5 hours" - dps_val: "5_5h" - value: "5,5 Stunden" + value: "5.5 hours" - dps_val: "6h" - value: "6 Stunden" + value: "6 hours" - dps_val: "6_5h" - value: "6,5 Stunden" + value: "6.5 hours" - dps_val: "7h" - value: "7 Stunden" + value: "7 hours" - dps_val: "7_5h" - value: "7,5 Stunden" + value: "7.5 hours" - entity: switch - name: luftbefeuchter + name: humidifier icon: "mdi:air-humidifier" category: config dps: From 192ca7fc2eec05dd3a8631c894a313041091a1b4 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 22 Jul 2024 21:19:21 +0900 Subject: [PATCH 083/169] Klarstein Skyscraper Ice: naming updates, time remaining sensor - move branding under products and use a generic top level name - separate out countdown_left attribute to a standard time_remaining sensor - Follow HA naming convention --- .../klarstein_skyscraper_ice_smart.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/custom_components/tuya_local/devices/klarstein_skyscraper_ice_smart.yaml b/custom_components/tuya_local/devices/klarstein_skyscraper_ice_smart.yaml index d471bcf8e1..7801911503 100644 --- a/custom_components/tuya_local/devices/klarstein_skyscraper_ice_smart.yaml +++ b/custom_components/tuya_local/devices/klarstein_skyscraper_ice_smart.yaml @@ -1,6 +1,7 @@ -name: Klarstein Skyscraper Ice Smart +name: Air cooler products: - id: vklyfhpnd7a47iym + name: Klarstein Skyscraper Ice Smart primary_entity: entity: fan translation_only_key: fan_with_presets @@ -31,9 +32,6 @@ primary_entity: - id: 10 type: boolean name: oscillate - - id: 12 - name: countdown_left - type: integer secondary_entities: - entity: select translation_key: timer @@ -75,10 +73,18 @@ secondary_entities: value: "7 hours" - dps_val: "7_5h" value: "7.5 hours" + - entity: sensor + category: diagnostic + translation_key: time_remaining + class: duration + dps: + - id: 12 + name: sensor + type: integer + unit: min - entity: switch - name: humidifier + name: Humidifier icon: "mdi:air-humidifier" - category: config dps: - id: 15 type: boolean From 394c9da6efb144a4e0f3ff78bcad1fba0abf9eac Mon Sep 17 00:00:00 2001 From: Neil Martin Date: Thu, 18 Jul 2024 21:19:36 +0100 Subject: [PATCH 084/169] Create DH-CSK03W_dehumidifier.yaml --- .../devices/DH-CSK03W_dehumidifier.yaml | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 custom_components/tuya_local/devices/DH-CSK03W_dehumidifier.yaml diff --git a/custom_components/tuya_local/devices/DH-CSK03W_dehumidifier.yaml b/custom_components/tuya_local/devices/DH-CSK03W_dehumidifier.yaml new file mode 100644 index 0000000000..5f43880cf9 --- /dev/null +++ b/custom_components/tuya_local/devices/DH-CSK03W_dehumidifier.yaml @@ -0,0 +1,95 @@ +name: "DH-CSK03W Dehumidifier" +primary_entity: + entity: humidifier + class: dehumidifier + dps: + - id: 1 + name: switch + type: boolean + mapping: + - dps_val: false + icon: "mdi:air-humidifier-off" + icon_priority: 2 + - dps_val: true + icon: "mdi:air-humidifier" + icon_priority: 4 + - id: 2 + name: humidity + type: integer + range: + min: 40 + max: 70 + mapping: + - step: 5 + - id: 5 + name: mode + type: string + mapping: + - dps_val: "mode_strong" + value: "Strong" + - dps_val: "mode_sleep" + value: "Sleep" + - id: 6 + type: integer + name: current_humidity +secondary_entities: + - entity: select + translation_key: timer + category: config + dps: + - id: 101 + type: string + name: option + optional: true + mapping: + - dps_val: "cancel" + value: "Off" + - dps_val: "2h" + value: "2 hours" + - dps_val: "4h" + value: "4 hours" + - dps_val: "8h" + value: "8 hours" + - dps_val: "12h" + value: "12 hours" + - dps_val: "18h" + value: "18 hours" + - dps_val: "24h" + value: "24 hours" + - dps_val: "36h" + value: "36 hours" + - dps_val: "48h" + value: "48 hours" + - entity: select + name: "Light mode" + category: config + dps: + - id: 31 + type: string + name: option + optional: true + mapping: + - dps_val: "ligth_off" + value: "Light Off" + - dps_val: "light_mode1" + value: "Light mode 1" + - dps_val: "light_mode2" + value: "Light mode 2" + - dps_val: "light_mode3" + value: "Light mode 3" + - entity: sensor + class: humidity + dps: + - id: 6 + type: integer + name: sensor + unit: "%" + class: measurement + - entity: sensor + class: temperature + dps: + - id: 7 + type: integer + name: sensor + unit: C + class: measurement From c38b5602d14aeb7ae74bf2e53b0de1f75bf4a065 Mon Sep 17 00:00:00 2001 From: Neil Martin Date: Sun, 21 Jul 2024 08:37:33 +0100 Subject: [PATCH 085/169] Updates/changes --- .../devices/DH-CSK03W_dehumidifier.yaml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/custom_components/tuya_local/devices/DH-CSK03W_dehumidifier.yaml b/custom_components/tuya_local/devices/DH-CSK03W_dehumidifier.yaml index 5f43880cf9..d237d2952a 100644 --- a/custom_components/tuya_local/devices/DH-CSK03W_dehumidifier.yaml +++ b/custom_components/tuya_local/devices/DH-CSK03W_dehumidifier.yaml @@ -6,13 +6,6 @@ primary_entity: - id: 1 name: switch type: boolean - mapping: - - dps_val: false - icon: "mdi:air-humidifier-off" - icon_priority: 2 - - dps_val: true - icon: "mdi:air-humidifier" - icon_priority: 4 - id: 2 name: humidity type: integer @@ -26,9 +19,9 @@ primary_entity: type: string mapping: - dps_val: "mode_strong" - value: "Strong" + value: "boost" - dps_val: "mode_sleep" - value: "Sleep" + value: "sleep" - id: 6 type: integer name: current_humidity @@ -77,14 +70,6 @@ secondary_entities: value: "Light mode 2" - dps_val: "light_mode3" value: "Light mode 3" - - entity: sensor - class: humidity - dps: - - id: 6 - type: integer - name: sensor - unit: "%" - class: measurement - entity: sensor class: temperature dps: From 38eb6148949dbfae76ac6df6ec3e0af35c3e02a9 Mon Sep 17 00:00:00 2001 From: Jianyun Date: Tue, 16 Jul 2024 09:50:46 +0800 Subject: [PATCH 086/169] Casdon TD Pro 2 add local recipe select --- .../tuya_local/devices/casdon_td_pro_2.yaml | 70 +++++++++++++++++++ .../tuya_local/translations/en.json | 36 ++++++++++ .../tuya_local/translations/zh-Hans.json | 36 ++++++++++ 3 files changed, 142 insertions(+) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index 056458f00c..d93a4640eb 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -206,3 +206,73 @@ secondary_entities: - id: 103 name: switch type: boolean + - entity: select + translation_key: casdon_oven_local_recipe + category: config + dps: + - id: 106 + name: option + type: string + mapping: + - dps_val: "0" + value: "none" + - dps_val: "1" + value: "steamed_egg_with_okra" + - dps_val: "2" + value: "steamed_sea_bass" + - dps_val: "3" + value: "steamed_prawns" + - dps_val: "4" + value: "handmade_steamed_bread" + - dps_val: "5" + value: "fan_steamed_baby_vegetables" + - dps_val: "6" + value: "braised_pork" + - dps_val: "7" + value: "snow_fungus_and_bird_s_nest" + - dps_val: "8" + value: "crab_pot" + - dps_val: "9" + value: "potato_ribs" + - dps_val: "10" + value: "coconut_chicken_soup" + - dps_val: "11" + value: "snack_platter" + - dps_val: "12" + value: "chicken_skewers" + - dps_val: "13" + value: "roasted_pork_knuckle" + - dps_val: "14" + value: "dried_lemon" + - dps_val: "15" + value: "pork_shop" + - dps_val: "16" + value: "crispy_hairtail" + - dps_val: "17" + value: "spicy_grilled_fish" + - dps_val: "18" + value: "roasted_sweet_potatoes" + - dps_val: "19" + value: "roasted_chicken_wings" + - dps_val: "20" + value: "cumin_lamb_chops" + - dps_val: "21" + value: "honey_grilled_chicken" + - dps_val: "22" + value: "garlic_eggplant" + - dps_val: "23" + value: "portuguese_egg_tart" + - dps_val: "24" + value: "creme_brulee" + - dps_val: "25" + value: "cocoa_chips" + - dps_val: "26" + value: "butter_cookies" + - dps_val: "27" + value: "chiffon_cake" + - dps_val: "28" + value: "puff_pastry" + - dps_val: "29" + value: "red_bean_bread" + - dps_val: "30" + value: "milk_toast" diff --git a/custom_components/tuya_local/translations/en.json b/custom_components/tuya_local/translations/en.json index 0525206f9b..b3010e8932 100644 --- a/custom_components/tuya_local/translations/en.json +++ b/custom_components/tuya_local/translations/en.json @@ -355,6 +355,42 @@ "celsius": "Celsius", "fahrenheit": "Fahrenheit" } + }, + "casdon_oven_local_recipe": { + "name": "Local Recipe", + "state": { + "none": "None", + "steamed_egg_with_okra": "Steamed Egg with Okra", + "steamed_sea_bass": "Steamed Sea Bass", + "steamed_prawns": "Steamed prawns", + "handmade_steamed_bread": "Handmade Steamed Bread", + "fan_steamed_baby_vegetables": "Fan Steamed Baby Vegetables", + "braised_pork": "Braised Pork", + "snow_fungus_and_bird_s_nest": "Snow fungus and bird s nest", + "crab_pot": "Crab Pot", + "potato_ribs": "Potato Ribs", + "coconut_chicken_soup": "Coconut Chicken Soup", + "snack_platter": "Snack Platter", + "chicken_skewers": "Chicken Skewers", + "roasted_pork_knuckle": "Roasted Pork Knuckle", + "dried_lemon": "Dried Lemon", + "pork_shop": "Pork Shop", + "crispy_hairtail": "Crispy Hairtail", + "spicy_grilled_fish": "Spicy Grilled Fish", + "roasted_sweet_potatoes": "Roasted Sweet Potatoes", + "roasted_chicken_wings": "Roasted Chicken Wings", + "cumin_lamb_chops": "Cumin Lamb Chops", + "honey_grilled_chicken": "Honey Grilled Chicken", + "garlic_eggplant": "Garlic Eggplant", + "portuguese_egg_tart": "Portuguese Egg Tart", + "creme_brulee": "Creme Brulee", + "cocoa_chips": "Cocoa Chips", + "butter_cookies": "Butter Cookies", + "chiffon_cake": "Chiffon Cake", + "puff_pastry": "Puff pastry", + "red_bean_bread": "Red Bean Bread", + "milk_toast": "Milk Toast" + } } }, "sensor": { diff --git a/custom_components/tuya_local/translations/zh-Hans.json b/custom_components/tuya_local/translations/zh-Hans.json index d343187b85..e3b4455685 100644 --- a/custom_components/tuya_local/translations/zh-Hans.json +++ b/custom_components/tuya_local/translations/zh-Hans.json @@ -355,6 +355,42 @@ "celsius": "摄氏度", "fahrenheit": "华氏度" } + }, + "casdon_oven_local_recipe": { + "name": "内置菜谱", + "state": { + "none": "无", + "steamed_egg_with_okra": "秋葵蒸蛋", + "steamed_sea_bass": "清蒸鲈鱼", + "steamed_prawns": "清蒸大虾", + "handmade_steamed_bread": "手工馒头", + "fan_steamed_baby_vegetables": "粉丝蒸娃娃菜", + "braised_pork": "红烧肉", + "snow_fungus_and_bird_s_nest": "雪耳燕窝", + "crab_pot": "蟹肉煲", + "potato_ribs": "土豆排骨", + "coconut_chicken_soup": "椰子鸡汤", + "snack_platter": "小食拼盘", + "chicken_skewers": "鸡肉串", + "roasted_pork_knuckle": "烤猪肘", + "dried_lemon": "柠檬干", + "pork_shop": "猪肉铺", + "crispy_hairtail": "香酥带鱼", + "spicy_grilled_fish": "麻辣烤鱼", + "roasted_sweet_potatoes": "烤红薯", + "roasted_chicken_wings": "香烤鸡翅", + "cumin_lamb_chops": "孜然羊排", + "honey_grilled_chicken": "蜜汁烤鸡", + "garlic_eggplant": "蒜蓉茄子", + "portuguese_egg_tart": "葡式蛋挞", + "creme_brulee": "焦糖布丁", + "cocoa_chips": "可可脆片", + "butter_cookies": "黄油曲奇", + "chiffon_cake": "戚风蛋糕", + "puff_pastry": "酥皮泡芙", + "red_bean_bread": "红豆面包", + "milk_toast": "牛奶吐司" + } } }, "sensor": { From ebf1dac7b38e2d79f515983581114770544e569a Mon Sep 17 00:00:00 2001 From: Jianyun Date: Wed, 17 Jul 2024 08:50:00 +0800 Subject: [PATCH 087/169] feat: Add optional field for 'option' in casdon_td_pro_2.yaml --- custom_components/tuya_local/devices/casdon_td_pro_2.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index d93a4640eb..684ca2296c 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -213,6 +213,7 @@ secondary_entities: - id: 106 name: option type: string + optional: true mapping: - dps_val: "0" value: "none" From cf5ffead80a396f7367dfbd945b9710dcdf04bc6 Mon Sep 17 00:00:00 2001 From: Jianyun Date: Thu, 18 Jul 2024 10:52:28 +0800 Subject: [PATCH 088/169] Fix translation key for oven local recipe --- custom_components/tuya_local/devices/casdon_td_pro_2.yaml | 2 +- custom_components/tuya_local/translations/en.json | 2 +- custom_components/tuya_local/translations/zh-Hans.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index 684ca2296c..9a5b4cbc62 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -207,7 +207,7 @@ secondary_entities: name: switch type: boolean - entity: select - translation_key: casdon_oven_local_recipe + translation_key: oven_local_recipe category: config dps: - id: 106 diff --git a/custom_components/tuya_local/translations/en.json b/custom_components/tuya_local/translations/en.json index b3010e8932..5a897875b3 100644 --- a/custom_components/tuya_local/translations/en.json +++ b/custom_components/tuya_local/translations/en.json @@ -356,7 +356,7 @@ "fahrenheit": "Fahrenheit" } }, - "casdon_oven_local_recipe": { + "oven_local_recipe": { "name": "Local Recipe", "state": { "none": "None", diff --git a/custom_components/tuya_local/translations/zh-Hans.json b/custom_components/tuya_local/translations/zh-Hans.json index e3b4455685..4b7b62a590 100644 --- a/custom_components/tuya_local/translations/zh-Hans.json +++ b/custom_components/tuya_local/translations/zh-Hans.json @@ -356,7 +356,7 @@ "fahrenheit": "华氏度" } }, - "casdon_oven_local_recipe": { + "oven_local_recipe": { "name": "内置菜谱", "state": { "none": "无", From 3fa84665c7fe807cfecb5d9923479cdb4cf9a7e1 Mon Sep 17 00:00:00 2001 From: Jianyun Date: Sun, 21 Jul 2024 16:19:36 +0800 Subject: [PATCH 089/169] feat: Update translation key for Casdon TD Pro 2 --- custom_components/tuya_local/devices/casdon_td_pro_2.yaml | 2 +- custom_components/tuya_local/translations/en.json | 2 +- custom_components/tuya_local/translations/zh-Hans.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index 9a5b4cbc62..f8b4736740 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -246,7 +246,7 @@ secondary_entities: - dps_val: "14" value: "dried_lemon" - dps_val: "15" - value: "pork_shop" + value: "pork_jerky" - dps_val: "16" value: "crispy_hairtail" - dps_val: "17" diff --git a/custom_components/tuya_local/translations/en.json b/custom_components/tuya_local/translations/en.json index 5a897875b3..64c3054a86 100644 --- a/custom_components/tuya_local/translations/en.json +++ b/custom_components/tuya_local/translations/en.json @@ -374,7 +374,7 @@ "chicken_skewers": "Chicken Skewers", "roasted_pork_knuckle": "Roasted Pork Knuckle", "dried_lemon": "Dried Lemon", - "pork_shop": "Pork Shop", + "pork_jerky": "Pork Jerky", "crispy_hairtail": "Crispy Hairtail", "spicy_grilled_fish": "Spicy Grilled Fish", "roasted_sweet_potatoes": "Roasted Sweet Potatoes", diff --git a/custom_components/tuya_local/translations/zh-Hans.json b/custom_components/tuya_local/translations/zh-Hans.json index 4b7b62a590..8464bf17ff 100644 --- a/custom_components/tuya_local/translations/zh-Hans.json +++ b/custom_components/tuya_local/translations/zh-Hans.json @@ -374,7 +374,7 @@ "chicken_skewers": "鸡肉串", "roasted_pork_knuckle": "烤猪肘", "dried_lemon": "柠檬干", - "pork_shop": "猪肉铺", + "pork_jerky": "猪肉脯", "crispy_hairtail": "香酥带鱼", "spicy_grilled_fish": "麻辣烤鱼", "roasted_sweet_potatoes": "烤红薯", From 4881510a9a98696a4d1c11c238ec155743480ab0 Mon Sep 17 00:00:00 2001 From: Jianyun Date: Sun, 21 Jul 2024 16:24:45 +0800 Subject: [PATCH 090/169] Update translation key for Casdon TD Pro 2 --- custom_components/tuya_local/translations/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/translations/en.json b/custom_components/tuya_local/translations/en.json index 64c3054a86..696c2dd630 100644 --- a/custom_components/tuya_local/translations/en.json +++ b/custom_components/tuya_local/translations/en.json @@ -366,7 +366,7 @@ "handmade_steamed_bread": "Handmade Steamed Bread", "fan_steamed_baby_vegetables": "Fan Steamed Baby Vegetables", "braised_pork": "Braised Pork", - "snow_fungus_and_bird_s_nest": "Snow fungus and bird s nest", + "snow_fungus_and_bird_s_nest": "Snow fungus and bird's nest", "crab_pot": "Crab Pot", "potato_ribs": "Potato Ribs", "coconut_chicken_soup": "Coconut Chicken Soup", From c877f5c3922758c394828db290e8399c466acee8 Mon Sep 17 00:00:00 2001 From: Jianyun Date: Sun, 21 Jul 2024 16:32:30 +0800 Subject: [PATCH 091/169] Update translation key for Casdon TD Pro 2 --- custom_components/tuya_local/devices/casdon_td_pro_2.yaml | 2 +- custom_components/tuya_local/translations/en.json | 4 ++-- custom_components/tuya_local/translations/zh-Hans.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml index f8b4736740..5782773892 100644 --- a/custom_components/tuya_local/devices/casdon_td_pro_2.yaml +++ b/custom_components/tuya_local/devices/casdon_td_pro_2.yaml @@ -207,7 +207,7 @@ secondary_entities: name: switch type: boolean - entity: select - translation_key: oven_local_recipe + translation_key: oven_built_in_recipe category: config dps: - id: 106 diff --git a/custom_components/tuya_local/translations/en.json b/custom_components/tuya_local/translations/en.json index 696c2dd630..9cae1831ee 100644 --- a/custom_components/tuya_local/translations/en.json +++ b/custom_components/tuya_local/translations/en.json @@ -356,8 +356,8 @@ "fahrenheit": "Fahrenheit" } }, - "oven_local_recipe": { - "name": "Local Recipe", + "oven_built_in_recipe": { + "name": "Built-in recipe", "state": { "none": "None", "steamed_egg_with_okra": "Steamed Egg with Okra", diff --git a/custom_components/tuya_local/translations/zh-Hans.json b/custom_components/tuya_local/translations/zh-Hans.json index 8464bf17ff..6a334e5123 100644 --- a/custom_components/tuya_local/translations/zh-Hans.json +++ b/custom_components/tuya_local/translations/zh-Hans.json @@ -356,7 +356,7 @@ "fahrenheit": "华氏度" } }, - "oven_local_recipe": { + "oven_built_in_recipe": { "name": "内置菜谱", "state": { "none": "无", From fab8e217de31c17a38ffd1503a221b1c78f81a7f Mon Sep 17 00:00:00 2001 From: sikkek Date: Thu, 25 Jul 2024 11:25:16 +0200 Subject: [PATCH 092/169] Update madimack_elite_v3_heatpump.yaml Added dps 15 to secondary entities (fault code), mapping of fault code to actual message is to be researched. Also added 102 (Inlet water temperature) to secondary entities as well, to get a more consistent list in HA, similar to the Tuya app. --- .../devices/madimack_elite_v3_heatpump.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml b/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml index e9209b9470..29019d216e 100644 --- a/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml +++ b/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml @@ -76,6 +76,13 @@ primary_entity: name: unknown_107 type: boolean secondary_entities: + - entity: sensor + category: diagnostic + name: Fault code + dps: + - id: 15 + name: sensor + type: integer - entity: sensor category: diagnostic name: Power level @@ -117,6 +124,22 @@ secondary_entities: value: F - dps_val: c value: C + - entity: sensor + category: diagnostic + name: Inlet water temperature + class: temperature + dps: + - id: 102 + name: sensor + type: integer + - id: 6 + name: unit + type: string + mapping: + - dps_val: f + value: F + - dps_val: c + value: C - entity: sensor category: diagnostic name: Outlet water temperature From 673966f1797d7566492bbd2169c57f6d7e03a73f Mon Sep 17 00:00:00 2001 From: sikkek Date: Thu, 25 Jul 2024 11:58:02 +0200 Subject: [PATCH 093/169] Update madimack_elite_v3_heatpump.yaml Changed Fault code to problem class --- .../devices/madimack_elite_v3_heatpump.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml b/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml index 29019d216e..24f416c7cc 100644 --- a/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml +++ b/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml @@ -76,13 +76,20 @@ primary_entity: name: unknown_107 type: boolean secondary_entities: - - entity: sensor + - entity: binary_sensor + class: problem category: diagnostic - name: Fault code dps: - id: 15 + type: bitfield name: sensor - type: integer + mapping: + - dps_val: 0 + value: false + - value: true + - id: 15 + type: bitfield + name: fault_code - entity: sensor category: diagnostic name: Power level From d699a613f3556532a9667b96c4ae2f882d91b8f2 Mon Sep 17 00:00:00 2001 From: sikkek Date: Fri, 26 Jul 2024 14:52:31 +0200 Subject: [PATCH 094/169] Update madimack_elite_v3_heatpump.yaml --- .../tuya_local/devices/madimack_elite_v3_heatpump.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml b/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml index 24f416c7cc..563b5f1982 100644 --- a/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml +++ b/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml @@ -66,9 +66,6 @@ primary_entity: - id: 102 name: current_temperature type: integer - - id: 15 - name: unknown_15 - type: integer - id: 101 name: unknown_101 type: integer From f60c3d833b071bae6a7d3418447f8f50a777c450 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 27 Jul 2024 12:47:41 +0900 Subject: [PATCH 095/169] Madimack Elite V3: remove duplicated sensor PR #2153 --- .../devices/madimack_elite_v3_heatpump.yaml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml b/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml index 563b5f1982..4ed3463c47 100644 --- a/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml +++ b/custom_components/tuya_local/devices/madimack_elite_v3_heatpump.yaml @@ -128,22 +128,6 @@ secondary_entities: value: F - dps_val: c value: C - - entity: sensor - category: diagnostic - name: Inlet water temperature - class: temperature - dps: - - id: 102 - name: sensor - type: integer - - id: 6 - name: unit - type: string - mapping: - - dps_val: f - value: F - - dps_val: c - value: C - entity: sensor category: diagnostic name: Outlet water temperature From 4df1c1a66b39f1720dd1ac4e3d7cbc32b48dbeb5 Mon Sep 17 00:00:00 2001 From: Daniel Levine Date: Sun, 7 Jul 2024 16:41:46 -0700 Subject: [PATCH 096/169] Add MOES Motion Sensor Smart Switch Note, this is different from MOES Motion Sensor Light --- .../devices/moes_motionsensor_switch.yaml | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 custom_components/tuya_local/devices/moes_motionsensor_switch.yaml diff --git a/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml b/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml new file mode 100644 index 0000000000..56ed3c9bca --- /dev/null +++ b/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml @@ -0,0 +1,113 @@ +# Example DPS Status +# {"dps": { "1": false, "14": "memory", "15": "relay", "43": false, "44": "on", "45": "default", "46": true, "47": "on", "48": "high", "49": 3600, "101": 0, "102": 0} +# Additional DPS 44 "Illuminance State" and 47 "Motion State". I couldn't figure out what those did, device debugger appears to indicate that these were set exactly once (to "on") when the switch was powered on and does NOT seem to trigger or respond when Illuminance or Motion trigger is met, but maybe I just don't know how to check that well. A final DPS shows up only in the Tuya Cloud API: 103 "Timer". There are "timers" in the Smart Life App for this device but I couldn't figure out how they work. +name: MOES Motion Sensor Smart Switch +products: + - id: vd5jgg8vgdbaqerq +primary_entity: + entity: switch + dps: + - id: 1 + name: switch + type: boolean +secondary_entities: + - entity: select + category: config + name: Restore power state + dps: + - id: 14 + name: option + type: string + mapping: + - dps_val: memory + value: Remember Last Status + - dps_val: "on" + value: "On" + - dps_val: "off" + value: "Off" + - entity: select + name: Indicator Light + category: config + dps: + - id: 15 + name: option + type: string + mapping: + - dps_val: none + value: Indicator LED off + - dps_val: relay + value: Indicate switch on/off + - entity: switch + # Enable or disable illuminance threshold for motion activation + dps: + - id: 43 + name: Illuminance Switch + type: boolean + - entity: select + name: Illuminance Threshold + category: config + dps: + - id: 45 + name: option + type: string + mapping: + - dps_val: default + value: Default Threshold + - dps_val: now + value: Current Illuminance + - entity: switch + # Enable or disable motion-triggered switch + dps: + - id: 46 + name: Motion Switch + type: boolean + - entity: select + name: Motion Sensitivity + category: config + dps: + - id: 48 + name: option + type: string + mapping: + - dps_val: "low" + value: "Low" + - dps_val: "middle" + value: "Medium" + - dps_val: "high" + value: "High" + - entity: number + name: Motion Auto-Off Delay + # Time in seconds after which to turn off light if triggered by motion + category: config + dps: + - id: 49 + name: option + type: integer + unit: s + range: + min: 5 + max: 3600 + - entity: number + name: Appointment Time + # Time of day in minutes when motion switch stops activating, 0 for always + category: config + dps: + - id: 101 + name: option + type: integer + unit: min + range: + min: 0 + max: 1440 + - entity: number + name: Target Time + # Time of day in minutes when motion switch can activate, 0 for always + category: config + dps: + - id: 102 + name: option + type: integer + unit: min + range: + min: 0 + max: 1440 From 932ecfe5e66671f0040f1f34d07b11d4be9940c9 Mon Sep 17 00:00:00 2001 From: Daniel Levine Date: Sun, 7 Jul 2024 20:25:39 -0700 Subject: [PATCH 097/169] Update moes_motionsensor_switch.yaml --- .../devices/moes_motionsensor_switch.yaml | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml b/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml index 56ed3c9bca..faeae915c2 100644 --- a/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml +++ b/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml @@ -1,6 +1,23 @@ # Example DPS Status -# {"dps": { "1": false, "14": "memory", "15": "relay", "43": false, "44": "on", "45": "default", "46": true, "47": "on", "48": "high", "49": 3600, "101": 0, "102": 0} -# Additional DPS 44 "Illuminance State" and 47 "Motion State". I couldn't figure out what those did, device debugger appears to indicate that these were set exactly once (to "on") when the switch was powered on and does NOT seem to trigger or respond when Illuminance or Motion trigger is met, but maybe I just don't know how to check that well. A final DPS shows up only in the Tuya Cloud API: 103 "Timer". There are "timers" in the Smart Life App for this device but I couldn't figure out how they work. +# {"dps": { "1": false, "14": "memory", "15": "relay", "43": false, "44": "on", +# "45": "default", "46": true, "47": "on", "48": "high", "49": 3600, "101": 0, +# "102": 0} +# Additional DPS 44 "Illuminance State" and 47 "Motion State". I couldn't +# figure out what those did, device debugger appears to indicate that these +# were set exactly once (to "on") when the switch was powered on and does NOT +# seem to trigger or respond when Illuminance or Motion trigger is met, but +# maybe I just don't know how to check that well. A final DPS shows up only in +# the Tuya Cloud API: 103 "Timer". There are "timers" in the Smart Life App for +# this device but I couldn't figure out how they work. +# Illuminance Switch: Enables/disables illuminance threshold for motion +# activation +# Motion Switch: Enables/disables motion-triggered switch +# Motion Auto-Off Delay: Time in seconds after which to turn off light if +# triggered by motion +# Appointment Time: Time of day in minutes when motion switch stops activating, +# 0 for always +# Target Time: Time of day in minutes when motion switch can activate, 0 for +# always name: MOES Motion Sensor Smart Switch products: - id: vd5jgg8vgdbaqerq @@ -38,7 +55,6 @@ secondary_entities: - dps_val: relay value: Indicate switch on/off - entity: switch - # Enable or disable illuminance threshold for motion activation dps: - id: 43 name: Illuminance Switch @@ -56,7 +72,6 @@ secondary_entities: - dps_val: now value: Current Illuminance - entity: switch - # Enable or disable motion-triggered switch dps: - id: 46 name: Motion Switch @@ -77,7 +92,6 @@ secondary_entities: value: "High" - entity: number name: Motion Auto-Off Delay - # Time in seconds after which to turn off light if triggered by motion category: config dps: - id: 49 @@ -89,7 +103,6 @@ secondary_entities: max: 3600 - entity: number name: Appointment Time - # Time of day in minutes when motion switch stops activating, 0 for always category: config dps: - id: 101 @@ -101,7 +114,6 @@ secondary_entities: max: 1440 - entity: number name: Target Time - # Time of day in minutes when motion switch can activate, 0 for always category: config dps: - id: 102 From 82ff106cfe3fd6f36d025a9196aeed82acf29c46 Mon Sep 17 00:00:00 2001 From: Daniel Levine Date: Sun, 7 Jul 2024 21:43:38 -0700 Subject: [PATCH 098/169] Update moes_motionsensor_switch.yaml --- .../tuya_local/devices/moes_motionsensor_switch.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml b/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml index faeae915c2..99d9641db2 100644 --- a/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml +++ b/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml @@ -55,9 +55,10 @@ secondary_entities: - dps_val: relay value: Indicate switch on/off - entity: switch + name: Illuminance Switch dps: - id: 43 - name: Illuminance Switch + name: switch type: boolean - entity: select name: Illuminance Threshold @@ -72,9 +73,10 @@ secondary_entities: - dps_val: now value: Current Illuminance - entity: switch + name: Motion Switch dps: - id: 46 - name: Motion Switch + name: switch type: boolean - entity: select name: Motion Sensitivity From a511c2000b7bc3d046738ffeaafbb3fed1e1902b Mon Sep 17 00:00:00 2001 From: Daniel Levine Date: Sun, 7 Jul 2024 22:33:14 -0700 Subject: [PATCH 099/169] Update moes_motionsensor_switch.yaml --- .../tuya_local/devices/moes_motionsensor_switch.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml b/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml index 99d9641db2..a0e2e5c90b 100644 --- a/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml +++ b/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml @@ -97,7 +97,7 @@ secondary_entities: category: config dps: - id: 49 - name: option + name: value type: integer unit: s range: @@ -108,7 +108,7 @@ secondary_entities: category: config dps: - id: 101 - name: option + name: value type: integer unit: min range: @@ -119,7 +119,7 @@ secondary_entities: category: config dps: - id: 102 - name: option + name: value type: integer unit: min range: From 6133d958bc8e7d87644587970fb72625a19ac40b Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 27 Jul 2024 12:43:10 +0900 Subject: [PATCH 100/169] Moes motion switch: changes from review - device naming - extra attributes - standardisation of entity names and values - clearer entity naming and scaling to convenient units for all clock time PR #2087 --- .../devices/moes_motionsensor_switch.yaml | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml b/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml index a0e2e5c90b..a9a6fa43be 100644 --- a/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml +++ b/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml @@ -18,32 +18,39 @@ # 0 for always # Target Time: Time of day in minutes when motion switch can activate, 0 for # always -name: MOES Motion Sensor Smart Switch +name: Motion sensor switch products: - id: vd5jgg8vgdbaqerq + name: Moes Smart PIR switch primary_entity: entity: switch dps: - id: 1 name: switch type: boolean + - id: 44 + type: string + name: illuminance_state + - id: 47 + type: string + name: motion_state secondary_entities: - entity: select category: config - name: Restore power state + name: Initial state dps: - id: 14 name: option type: string mapping: - dps_val: memory - value: Remember Last Status + value: Last state - dps_val: "on" value: "On" - dps_val: "off" value: "Off" - entity: select - name: Indicator Light + name: Indicator light category: config dps: - id: 15 @@ -51,17 +58,17 @@ secondary_entities: type: string mapping: - dps_val: none - value: Indicator LED off + value: "Off" - dps_val: relay - value: Indicate switch on/off + value: "Status" - entity: switch - name: Illuminance Switch + name: Illuminance enable dps: - id: 43 name: switch type: boolean - entity: select - name: Illuminance Threshold + name: Illuminance threshold category: config dps: - id: 45 @@ -69,17 +76,17 @@ secondary_entities: type: string mapping: - dps_val: default - value: Default Threshold + value: Default - dps_val: now - value: Current Illuminance + value: Set current - entity: switch - name: Motion Switch + name: Motion enable dps: - id: 46 name: switch type: boolean - entity: select - name: Motion Sensitivity + name: Motion sensitivity category: config dps: - id: 48 @@ -93,7 +100,7 @@ secondary_entities: - dps_val: "high" value: "High" - entity: number - name: Motion Auto-Off Delay + name: Motion auto-off delay category: config dps: - id: 49 @@ -104,24 +111,28 @@ secondary_entities: min: 5 max: 3600 - entity: number - name: Appointment Time + name: Disable time category: config dps: - id: 101 name: value type: integer - unit: min + unit: h range: min: 0 max: 1440 + mapping: + - scale: 60 - entity: number - name: Target Time + name: Enable time category: config dps: - id: 102 name: value type: integer - unit: min + unit: h range: min: 0 max: 1440 + mapping: + - scale: 60 From c0f331f550f90cb600a43cceb9ade94e6dacde6e Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 27 Jul 2024 12:49:24 +0900 Subject: [PATCH 101/169] Moes motion switch: whitespace fix --- .../tuya_local/devices/moes_motionsensor_switch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml b/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml index a9a6fa43be..d80c96838d 100644 --- a/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml +++ b/custom_components/tuya_local/devices/moes_motionsensor_switch.yaml @@ -28,7 +28,7 @@ primary_entity: - id: 1 name: switch type: boolean - - id: 44 + - id: 44 type: string name: illuminance_state - id: 47 From e2b9ab42bfacf22c9856b9975ef899ed3bb2fd70 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 28 Jul 2024 12:37:34 +0900 Subject: [PATCH 102/169] Caldo Up-T: fix preset dp values The device apparently uses level_1..level_3, not the "0".."2" that was originally included in the PR. PR #2033 --- custom_components/tuya_local/devices/caldo_up_t_wifi.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/tuya_local/devices/caldo_up_t_wifi.yaml b/custom_components/tuya_local/devices/caldo_up_t_wifi.yaml index e490c6d8c0..cdd0fbf645 100644 --- a/custom_components/tuya_local/devices/caldo_up_t_wifi.yaml +++ b/custom_components/tuya_local/devices/caldo_up_t_wifi.yaml @@ -28,11 +28,11 @@ primary_entity: type: string name: preset_mode mapping: - - dps_val: "0" + - dps_val: "level_1" value: none - - dps_val: "1" + - dps_val: "level_2" value: comfort - - dps_val: "2" + - dps_val: "level_3" value: boost - id: 8 type: boolean From fcedb983ac040b7c9fea6c5ee24effd89743ad46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A0s=20Sanju=C3=A1n?= <39006479+tomassanjuann@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:22:21 +0200 Subject: [PATCH 103/169] Add support for Tera W01 EV Charger --- .../devices/tera_w01_evcharger.yaml | 270 ++++++++++++++++++ 1 file changed, 270 insertions(+) create mode 100644 custom_components/tuya_local/devices/tera_w01_evcharger.yaml diff --git a/custom_components/tuya_local/devices/tera_w01_evcharger.yaml b/custom_components/tuya_local/devices/tera_w01_evcharger.yaml new file mode 100644 index 0000000000..81689e581a --- /dev/null +++ b/custom_components/tuya_local/devices/tera_w01_evcharger.yaml @@ -0,0 +1,270 @@ +name: Tera W01 EV charger +products: + - id: o4zjlnwqwe0dzitl + name: Tera 22kW EV charger (32A / 3 phase) +primary_entity: + entity: sensor + name: Status + icon: "mdi:ev-station" + class: enum + dps: + - id: 3 # work_state + type: string + name: sensor + mapping: + - dps_val: charger_charging + value: Charging + - dps_val: charger_free + value: Available + - dps_val: charger_insert + value: Plugged in + - dps_val: charger_free_fault + value: Fault + - dps_val: charger_wait + value: Delaying + - dps_val: charger_pause + value: Paused + - dps_val: charger_end + value: Charged + - dps_val: charger_fault + value: Fault (plugged in) + - id: 23 # system_version + type: string + name: system_version +secondary_entities: + - entity: sensor + class: energy + name: Current session + dps: + - id: 1 # forward_energy_total + type: integer + name: sensor + class: total_increasing + unit: kWh + mapping: + - scale: 100 + - entity: number + name: Max current + category: config + class: current + icon: "mdi:ev-plug-type2" + dps: + - id: 4 # charge_cur_set + type: integer + name: value + unit: A + range: + min: 8 + max: 32 + - entity: sensor + name: L1 Voltage + class: voltage + category: diagnostic + dps: + - id: 6 # phase_1 + type: base64 + name: sensor + optional: true + unit: V + mapping: + - mask: "FFFF000000000000" + scale: 10 + - entity: sensor + name: L1 Current + class: current + category: diagnostic + dps: + - id: 6 # phase_1 + type: base64 + name: sensor + optional: true + unit: A + mapping: + - mask: "0000FFFFFF000000" + scale: 1000 + - entity: sensor + name: L1 Power + class: power + category: diagnostic + dps: + - id: 6 # phase_1 + type: base64 + name: sensor + optional: true + unit: kW + mapping: + - mask: "0000000000FFFFFF" + scale: 1000 + - entity: sensor + name: L2 Voltage + class: voltage + category: diagnostic + dps: + - id: 7 # phase_2 + type: base64 + name: sensor + optional: true + unit: V + mapping: + - mask: "FFFF000000000000" + scale: 10 + - entity: sensor + name: L2 Current + class: current + category: diagnostic + dps: + - id: 7 # phase_2 + type: base64 + name: sensor + optional: true + unit: A + mapping: + - mask: "0000FFFFFF000000" + scale: 1000 + - entity: sensor + name: L2 Power + class: power + category: diagnostic + dps: + - id: 7 # phase_2 + type: base64 + name: sensor + optional: true + unit: kW + mapping: + - mask: "0000000000FFFFFF" + scale: 1000 + - entity: sensor + name: L3 Voltage + class: voltage + category: diagnostic + dps: + - id: 8 # phase_3 + type: base64 + name: sensor + optional: true + unit: V + mapping: + - mask: "FFFF000000000000" + scale: 10 + - entity: sensor + name: L3 Current + class: current + category: diagnostic + dps: + - id: 8 # phase_3 + type: base64 + name: sensor + optional: true + unit: A + mapping: + - mask: "0000FFFFFF000000" + scale: 1000 + - entity: sensor + name: L3 Power + class: power + category: diagnostic + dps: + - id: 8 # phase_3 + type: base64 + name: sensor + optional: true + unit: kW + mapping: + - mask: "0000000000FFFFFF" + scale: 1000 + - entity: sensor + name: Power + class: power + dps: + - id: 9 # power_total + type: integer + name: sensor + unit: kW + class: measurement + mapping: + - scale: 1000 + - entity: binary_sensor + name: Error + class: problem + category: diagnostic + dps: + - id: 10 # fault + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - id: 10 # fault + type: bitfield + name: fault_code + - entity: sensor + name: Connection + icon: "mdi:ev-plug-type2" + class: enum + dps: + - id: 13 # connection_state + type: string + name: sensor + mapping: + - dps_val: controlpi_12v + value: Standby + - dps_val: controlpi_12v_pwm + value: Communication initialising + - dps_val: controlpi_9v + value: Vehicle detected + - dps_val: controlpi_9v_pwm + value: Vehicle connected + - dps_val: controlpi_6v + value: Ready to charge + - dps_val: controlpi_6v_pwm + value: Charging + - dps_val: controlpi_error + value: Error + - entity: select + name: Mode + category: config + icon: "mdi:ev-station" + dps: + - id: 14 # work_mode + type: string + name: option + mapping: + - dps_val: charge_now + value: Immediate + - dps_val: charge_energy + value: Fixed charge + - dps_val: charge_schedule + value: Scheduled charge + - dps_val: charge_delay + value: Delayed charge + - dps_val: charge_pct + value: Percentage charge + - entity: switch + icon: "mdi:ev-station" + dps: + - id: 18 # switch + type: boolean + name: switch + - entity: sensor + name: Temperature + class: temperature + dps: + - id: 24 # temp_current + type: integer + name: sensor + unit: C + class: measurement + - entity: number + name: Delay charge + category: config + icon: "mdi:car-clock" + dps: + - id: 28 # timer_on + type: integer + name: value + unit: h + range: + min: 0 + max: 12 \ No newline at end of file From 36ec57519e3ae95363b315ce7673a5b82a567df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A0s=20Sanju=C3=A1n?= <39006479+tomassanjuann@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:55:19 +0200 Subject: [PATCH 104/169] Linting to pass tests --- .../tuya_local/devices/tera_w01_evcharger.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/tuya_local/devices/tera_w01_evcharger.yaml b/custom_components/tuya_local/devices/tera_w01_evcharger.yaml index 81689e581a..fa1211210e 100644 --- a/custom_components/tuya_local/devices/tera_w01_evcharger.yaml +++ b/custom_components/tuya_local/devices/tera_w01_evcharger.yaml @@ -177,7 +177,7 @@ secondary_entities: name: Power class: power dps: - - id: 9 # power_total + - id: 9 # power_total type: integer name: sensor unit: kW @@ -196,7 +196,7 @@ secondary_entities: - dps_val: 0 value: false - value: true - - id: 10 # fault + - id: 10 # fault type: bitfield name: fault_code - entity: sensor @@ -227,7 +227,7 @@ secondary_entities: category: config icon: "mdi:ev-station" dps: - - id: 14 # work_mode + - id: 14 # work_mode type: string name: option mapping: @@ -251,7 +251,7 @@ secondary_entities: name: Temperature class: temperature dps: - - id: 24 # temp_current + - id: 24 # temp_current type: integer name: sensor unit: C @@ -267,4 +267,4 @@ secondary_entities: unit: h range: min: 0 - max: 12 \ No newline at end of file + max: 12 From 6100febe2190ea072290516886eb7e923ab78095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A0s=20Sanju=C3=A1n?= <39006479+tomassanjuann@users.noreply.github.com> Date: Sun, 21 Jul 2024 20:13:12 +0200 Subject: [PATCH 105/169] Remove make name --- custom_components/tuya_local/devices/tera_w01_evcharger.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/tera_w01_evcharger.yaml b/custom_components/tuya_local/devices/tera_w01_evcharger.yaml index fa1211210e..a3458e410a 100644 --- a/custom_components/tuya_local/devices/tera_w01_evcharger.yaml +++ b/custom_components/tuya_local/devices/tera_w01_evcharger.yaml @@ -1,4 +1,4 @@ -name: Tera W01 EV charger +name: EV charger products: - id: o4zjlnwqwe0dzitl name: Tera 22kW EV charger (32A / 3 phase) From 753581e9d426f248c38747792d62d9d689a91876 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 23 Jul 2024 22:31:20 +0900 Subject: [PATCH 106/169] Tera W01: add space before comment Yamllint expects 2 spaces before inline end-of-line comment. PR #2116 --- custom_components/tuya_local/devices/tera_w01_evcharger.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/tera_w01_evcharger.yaml b/custom_components/tuya_local/devices/tera_w01_evcharger.yaml index a3458e410a..6681d41233 100644 --- a/custom_components/tuya_local/devices/tera_w01_evcharger.yaml +++ b/custom_components/tuya_local/devices/tera_w01_evcharger.yaml @@ -261,7 +261,7 @@ secondary_entities: category: config icon: "mdi:car-clock" dps: - - id: 28 # timer_on + - id: 28 # timer_on type: integer name: value unit: h From 59a940b49284e7c482c7080b71dc5f0e34345091 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Fri, 26 Jul 2024 22:00:55 +0900 Subject: [PATCH 107/169] Tera W01: remove unnecessary sensor names To allow translations to be used, names should be left off. --- custom_components/tuya_local/devices/tera_w01_evcharger.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/custom_components/tuya_local/devices/tera_w01_evcharger.yaml b/custom_components/tuya_local/devices/tera_w01_evcharger.yaml index 6681d41233..734790195c 100644 --- a/custom_components/tuya_local/devices/tera_w01_evcharger.yaml +++ b/custom_components/tuya_local/devices/tera_w01_evcharger.yaml @@ -34,7 +34,6 @@ primary_entity: secondary_entities: - entity: sensor class: energy - name: Current session dps: - id: 1 # forward_energy_total type: integer @@ -174,7 +173,6 @@ secondary_entities: - mask: "0000000000FFFFFF" scale: 1000 - entity: sensor - name: Power class: power dps: - id: 9 # power_total @@ -185,7 +183,6 @@ secondary_entities: mapping: - scale: 1000 - entity: binary_sensor - name: Error class: problem category: diagnostic dps: @@ -248,7 +245,6 @@ secondary_entities: type: boolean name: switch - entity: sensor - name: Temperature class: temperature dps: - id: 24 # temp_current From b5ee7bdfdbce6ef2b88e2e179965aa5a7cfd16fc Mon Sep 17 00:00:00 2001 From: illuzn <57167030+illuzn@users.noreply.github.com> Date: Mon, 22 Jul 2024 18:42:21 +0930 Subject: [PATCH 108/169] Initial commit - implement generic tuya human presence sensor --- .../devices/human_presence_detector.yaml | 139 ++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 custom_components/tuya_local/devices/human_presence_detector.yaml diff --git a/custom_components/tuya_local/devices/human_presence_detector.yaml b/custom_components/tuya_local/devices/human_presence_detector.yaml new file mode 100644 index 0000000000..a59e22fc45 --- /dev/null +++ b/custom_components/tuya_local/devices/human_presence_detector.yaml @@ -0,0 +1,139 @@ +name: human presence detector +products: + - id: 02a339dfa475cd37 + name: RTCZ-03 human presence sensor +primary_entity: + entity: binary_sensor + class: occupancy + dps: + - id: 1 + type: boolean + name: sensor + mapping: + - dps_val: peaceful + value: false + - dps_val: presence + value: true + - dps_val: small_move + value: true + - dps_val: large_move + value: true + - dps_val: none + value: false + - id: 1 + type: string + name: raw_state +secondary_entities: + - entity: binary_sensor + class: motion + dps: + - id: 1 + type: boolean + name: sensor + mapping: + - dps_val: peaceful + value: false + - dps_val: presence + value: false + - dps_val: small_move + value: true + - dps_val: large_move + value: true + - dps_val: none + value: false + - entity: sensor + class: distance + dps: + - id: 101 + type: integer + name: sensor + unit: cm + - entity: sensor + class: illuminance + dps: + - id: 102 + type: integer + name: sensor + unit: lx + - entity: number + name: clear delay + dps: + - id: 103 + type: integer + name: value + range: + min: 0 + max: 28799 + unit: s + - entity: light + category: config + name: indicator light + dps: + - id: 104 + type: boolean + name: switch + - entity: number + category: config + name: Maximum detection distance + dps: + - id: 107 + type: integer + name: value + range: + min: 0 + max: 840 + unit: cm + - entity: number + category: config + name: Minimum detection distance + dps: + - id: 108 + type: integer + name: value + range: + min: 0 + max: 840 + unit: cm + - entity: number + category: config + name: Detection Sensitivity + dps: + - id: 111 + type: integer + name: value + range: + min: 0 + max: 10 + - entity: number + category: config + name: Hold Sensitivity + dps: + - id: 112 + type: integer + name: value + range: + min: 0 + max: 10 + - entity: sensor + category: diagnostic + name: hold (min) + dps: + - id: 105 + type: integer + unit: min + name: sensor + - entity: sensor + category: diagnostic + name: hold (sec) + dps: + - id: 106 + type: integer + unit: s + name: sensor + - entity: sensor + category: diagnostic + name: debug + dps: + - id: 120 + type: string + name: sensor From 7dd6c0c8941bf05e48ad0d8b5c6769a83518a654 Mon Sep 17 00:00:00 2001 From: illuzn <57167030+illuzn@users.noreply.github.com> Date: Mon, 22 Jul 2024 18:52:03 +0930 Subject: [PATCH 109/169] correct product_id --- .../tuya_local/devices/human_presence_detector.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/human_presence_detector.yaml b/custom_components/tuya_local/devices/human_presence_detector.yaml index a59e22fc45..4061ddc0c1 100644 --- a/custom_components/tuya_local/devices/human_presence_detector.yaml +++ b/custom_components/tuya_local/devices/human_presence_detector.yaml @@ -1,6 +1,6 @@ name: human presence detector products: - - id: 02a339dfa475cd37 + - id: e833v6jexwfkjrij name: RTCZ-03 human presence sensor primary_entity: entity: binary_sensor From 41d450e5be22d2fd1d7baa1b0aa12ccdbd7499fc Mon Sep 17 00:00:00 2001 From: illuzn <57167030+illuzn@users.noreply.github.com> Date: Tue, 23 Jul 2024 12:32:25 +0930 Subject: [PATCH 110/169] Typo and other minor fixes --- .../devices/human_presence_detector.yaml | 39 ++++++++----------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/custom_components/tuya_local/devices/human_presence_detector.yaml b/custom_components/tuya_local/devices/human_presence_detector.yaml index 4061ddc0c1..7616d6add4 100644 --- a/custom_components/tuya_local/devices/human_presence_detector.yaml +++ b/custom_components/tuya_local/devices/human_presence_detector.yaml @@ -1,4 +1,4 @@ -name: human presence detector +name: Human presence detector products: - id: e833v6jexwfkjrij name: RTCZ-03 human presence sensor @@ -7,7 +7,7 @@ primary_entity: class: occupancy dps: - id: 1 - type: boolean + type: string name: sensor mapping: - dps_val: peaceful @@ -28,7 +28,7 @@ secondary_entities: class: motion dps: - id: 1 - type: boolean + type: string name: sensor mapping: - dps_val: peaceful @@ -56,7 +56,7 @@ secondary_entities: name: sensor unit: lx - entity: number - name: clear delay + name: Clear delay dps: - id: 103 type: integer @@ -65,9 +65,18 @@ secondary_entities: min: 0 max: 28799 unit: s + - entity: sensor + - id: 105 + type: integer + unit: min + name: minutes + - id: 106 + type: integer + unit: s + name: seconds - entity: light category: config - name: indicator light + translation_key: indicator dps: - id: 104 type: boolean @@ -96,7 +105,7 @@ secondary_entities: unit: cm - entity: number category: config - name: Detection Sensitivity + name: Detection sensitivity dps: - id: 111 type: integer @@ -106,7 +115,7 @@ secondary_entities: max: 10 - entity: number category: config - name: Hold Sensitivity + name: Hold sensitivity dps: - id: 112 type: integer @@ -114,22 +123,6 @@ secondary_entities: range: min: 0 max: 10 - - entity: sensor - category: diagnostic - name: hold (min) - dps: - - id: 105 - type: integer - unit: min - name: sensor - - entity: sensor - category: diagnostic - name: hold (sec) - dps: - - id: 106 - type: integer - unit: s - name: sensor - entity: sensor category: diagnostic name: debug From 3910a93c94237f965ec4708071f2e33f3f511e2c Mon Sep 17 00:00:00 2001 From: illuzn <57167030+illuzn@users.noreply.github.com> Date: Tue, 23 Jul 2024 12:35:29 +0930 Subject: [PATCH 111/169] Typo fix --- .../tuya_local/devices/human_presence_detector.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/custom_components/tuya_local/devices/human_presence_detector.yaml b/custom_components/tuya_local/devices/human_presence_detector.yaml index 7616d6add4..2fd44d6bca 100644 --- a/custom_components/tuya_local/devices/human_presence_detector.yaml +++ b/custom_components/tuya_local/devices/human_presence_detector.yaml @@ -65,7 +65,6 @@ secondary_entities: min: 0 max: 28799 unit: s - - entity: sensor - id: 105 type: integer unit: min From ba5b87d8a9dbc2e785bd73d71b47b65a6840bc3c Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 27 Jul 2024 12:56:53 +0900 Subject: [PATCH 112/169] Human presence detector: move debug to attribute PR #2146 --- .../tuya_local/devices/human_presence_detector.yaml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/custom_components/tuya_local/devices/human_presence_detector.yaml b/custom_components/tuya_local/devices/human_presence_detector.yaml index 2fd44d6bca..93cfac9285 100644 --- a/custom_components/tuya_local/devices/human_presence_detector.yaml +++ b/custom_components/tuya_local/devices/human_presence_detector.yaml @@ -23,6 +23,9 @@ primary_entity: - id: 1 type: string name: raw_state + - id: 120 + type: string + name: debug secondary_entities: - entity: binary_sensor class: motion @@ -122,10 +125,3 @@ secondary_entities: range: min: 0 max: 10 - - entity: sensor - category: diagnostic - name: debug - dps: - - id: 120 - type: string - name: sensor From d1250b592cfe382e646a8d72c1ca32805a1f69f4 Mon Sep 17 00:00:00 2001 From: Rory Campbell Date: Wed, 24 Jul 2024 16:26:41 -0400 Subject: [PATCH 113/169] Added the welltobe cat feader device --- .../devices/welltobe_cat_feeder.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 custom_components/tuya_local/devices/welltobe_cat_feeder.yaml diff --git a/custom_components/tuya_local/devices/welltobe_cat_feeder.yaml b/custom_components/tuya_local/devices/welltobe_cat_feeder.yaml new file mode 100644 index 0000000000..0d0b193f0b --- /dev/null +++ b/custom_components/tuya_local/devices/welltobe_cat_feeder.yaml @@ -0,0 +1,49 @@ +name: Pet feeder +products: + - id: qqzpxhisd6zs8zyq + name: WellToBe Automatic Pet Feeder (WB S36D) +primary_entity: + entity: number + icon: "mdi:paw" + name: Manual feed + dps: + - id: 3 + name: value + optional: true + type: integer + unit: portions + range: + min: 1 + max: 6 +secondary_entities: + - entity: switch + name: Slow feed + icon: "mdi:speedometer-slow" + dps: + - id: 6 + type: boolean + name: switch + - entity: binary_sensor + name: Fault + icon: "mdi:alert" + class: problem + category: diagnostic + dps: + - id: 14 + type: integer + name: sensor + - entity: switch + name: 12/24 hour clock + icon: "mdi:clock" + dps: + - id: 102 + type: boolean + name: switch + - entity: sensor + icon: "mdi:battery" + name: Battery + category: diagnostic + dps: + - id: 103 + name: sensor + type: string From d5aaaff75962305e6fd8290d561706258acaaed3 Mon Sep 17 00:00:00 2001 From: Rory Campbell Date: Wed, 24 Jul 2024 16:29:23 -0400 Subject: [PATCH 114/169] Added to the supported device list --- DEVICES.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DEVICES.md b/DEVICES.md index 6e2c8397d4..15d82c4d41 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -509,7 +509,7 @@ of device. - LightStar CCT track light - Loycco sound machine with nightlight (also sold as Momland nightlight with white noise) - Loginovo TV sync backlight -- LSC smart connect RGB CCT lightbulb (similar to older generic bulbs, so may work for others) +- LSC smart connect RGB CCT lightbulb (similar to older generic bulbs, so may work for others) - Lytmi Fantasy/Neo 3 HDMI sync backlight - Marpou RGBCW ceiling light - Mirabella Genio Pixel LED oval light @@ -664,6 +664,7 @@ port and password. - PNI water feeder - Rojeco PTM-001 pet feeder (two versions) - V330L pet feeder +- WellToBe Automatic Pet Feeder (WB S36D) - YP pet feeder ### Remote controllers @@ -756,7 +757,7 @@ port and password. - PT216/PT19DB-2 temperature and humidity sensor - SGS01 plant sensor - Smart Ape solar garden light -- TCS024B plant moisture sensor +- TCS024B plant moisture sensor - TH05 temperature and humidity sensor - XCase NX-4964 lock box - YL01 water quality tester From 79de1e243ea24ef881b2b8c81509dc709f303067 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 28 Jul 2024 16:10:00 +0900 Subject: [PATCH 115/169] WellToBe pet feeder: changes from review - simplify product name - remove explicit name and icon from problem sensor - add mapping for problem sensor - make clock type a select instead of switch - PENDING: standardise battery sensor (requires list of possible values) PR #2150 --- .../devices/welltobe_cat_feeder.yaml | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/custom_components/tuya_local/devices/welltobe_cat_feeder.yaml b/custom_components/tuya_local/devices/welltobe_cat_feeder.yaml index 0d0b193f0b..e5709b9d21 100644 --- a/custom_components/tuya_local/devices/welltobe_cat_feeder.yaml +++ b/custom_components/tuya_local/devices/welltobe_cat_feeder.yaml @@ -1,7 +1,7 @@ name: Pet feeder products: - id: qqzpxhisd6zs8zyq - name: WellToBe Automatic Pet Feeder (WB S36D) + name: WellToBe WB S36D primary_entity: entity: number icon: "mdi:paw" @@ -24,21 +24,28 @@ secondary_entities: type: boolean name: switch - entity: binary_sensor - name: Fault - icon: "mdi:alert" class: problem category: diagnostic dps: - id: 14 - type: integer + type: bitfield name: sensor - - entity: switch - name: 12/24 hour clock + mapping: + - dps_val: 0 + value: false + - value: true + - entity: select + name: Clock type icon: "mdi:clock" dps: - id: 102 type: boolean - name: switch + name: option + mapping: + - dps_val: false + value: "12 hour" + - dps_val: true + value: "24 hour" - entity: sensor icon: "mdi:battery" name: Battery From 5f09d8677818b7c1cdea08d38ee0ec41d7fea8ee Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 28 Jul 2024 20:03:37 +0900 Subject: [PATCH 116/169] Docs for recent merged PRs - rename human_presence_sensor.yaml to more specific name. There is no evidence that is is generic enough to go without some identifier. PR #2153, #2150, #2146, #2145, #2143, #2137, #2136, #2134, #2116, PR #2087, #2033 --- ACKNOWLEDGEMENTS.md | 11 +++++++++-- DEVICES.md | 7 ++++++- ...sence_detector.yaml => rtcz03_presencesensor.yaml} | 0 3 files changed, 15 insertions(+), 3 deletions(-) rename custom_components/tuya_local/devices/{human_presence_detector.yaml => rtcz03_presencesensor.yaml} (100%) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 38fdfa3d17..a636bde600 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -103,7 +103,7 @@ Further device support has been made with the assistance of users. Please consid - [JanekSMC](https://github.com/JanekSMC) for assistance supporting Orion Smart Locks. - [RichardMawdsley](https://github.com/RichardMawdsley) for assistance supporting ElectriQ Airflex 15W heatpumps. - [fwelvering](https://github.com/fwelvering) for assistance supporting a second variant of W'eau pool heatpumps. -- [illuzn](https://github.com/illuzn) for contributing support for Kogan Tower Heaters, Arlec PB88UHA and Brilliant quad power strips and Qoto water valves. +- [illuzn](https://github.com/illuzn) for contributing support for Kogan Tower Heaters, Arlec PB88UHA, Brilliant quad power strips, Qoto water valves, RTCZ-03 human presence sensor. - [vnkorol](https://github.com/vnkorol) for assistance supporting 4-way power monitoring strip and Avatto roller blinds. - [OmegaKill](https://github.com/OmegaKill) for assistance supporting Be Cool heatpumps. - [djusHa](https://github.com/djusHa) for contributing support for essentials portable air purifier. @@ -425,7 +425,7 @@ Further device support has been made with the assistance of users. Please consid - [alirow](https://github.com/alirow) for contributing support for Argo Dry Pury Evo WF dehumidifiers. - [andrei-cerbulescu](https://github.com/andrei-cerbulescu) for contributing support for Hama radiator controllers. - [mariuszpass](https://github.com/mariuszpass) for contributing support for NAC AP470 air purifiers. -- [neilmartin83](https://github.com/neilmartin83) for contributing support for Ustellar UT99911 RGB monitor light bars. +- [neilmartin83](https://github.com/neilmartin83) for contributing support for Ustellar UT99911 RGB monitor light bar and DH-CSK03W dehumidifer. - [evanfoster](https://github.com/evanfoster) for contributing support for Vivosun DE0003 dehumidifiers. - [sayaivan](https://github.com/sayaivan) for contributing Indonesian translations. - [mhackdo18](https://github.com/mhackdo18) for assisting with support for YP Pet feeder. @@ -599,3 +599,10 @@ Further device support has been made with the assistance of users. Please consid - [swonge](https://github.com/swonge) for contributing Chinese (Traditional) translations. - [joe-sydney](https://github.com/joe-sydney) for contributing support for old style generic CCT lightbulbs (tested with Connect Smart GU10 downlight). - [e2equiel](https://github.com/e2equiel) for contributing improvements to V330L pet feeder (for DU4L-VS model). +- [piotrek2555](https://github.com/piotrek) for contributing improvements to Rotenso Ronix heat pump. +- [zalatnaisongor](https://github.com/zalatnaisongor) for contributing improvements to SH07 sprinkler controller to support Leictory LK06. +- [Ryoga85](https://github.com/Ryoga85) for contributing support for Klarstein Skyscraper Ice cooling fan. +- [sikkek](https://github.com/sikkek) for contributing improvements to Madimack Elite V3 heat pump. +- [levineds](https://github.com/levineds) for contributing support for Moes motion sensor smart switch. +- [tomassanjuann](https://github.com/tomassanjuann) for contributing support for Tera W01 EV charger. +- [rorydcampbell](https://github.com/rorydcampbell) for comtributing support for WellToBe WB S36D pet feeder. diff --git a/DEVICES.md b/DEVICES.md index 15d82c4d41..a4cfb2d8d4 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -213,6 +213,7 @@ - Hiper T3 bladeless fan - HYD WeAir Plus bladeless fan with heating function - Immax Neo Lite Vento ceiling fan with light +- Klarstein Skyscaper Ice cooling fan - Ledkia fan and light controller - Lexy F501 fan - Keyun MKCFE002 RGB chandelier fan @@ -266,6 +267,7 @@ - AlecoAir D25 Traditio dehumidifier - Argo Dry Pury Evo WF dehumidifier - Cleverio AD100 dehumidifier +- DH-CSK03W dehumidifier - Ebac DJ4000 dehumidifier - ElectriQ CD12PRO-LE dehumidifier - ElectriQ CD12PW dehumidifier @@ -380,6 +382,7 @@ - Feyree home EV charger (2 models) - Kolanky 3.6kW EV charger - Parkside PLGS 2012 A1 smart charger for powertools +- Tera W01 EV charger - Vivor portable EV charger - WOUEJ 22kW EV charger @@ -427,6 +430,7 @@ the best option. - Mirabella Genio smartplug with USB - Moes 3-gang switch - Moes 4-gang (quad) switch +- Moes motion sensor smart switch - MoesHouse smartplug with RGBW nightlight - Noiee NSP21 smartplug - Noiee PU13 smartplug @@ -685,7 +689,7 @@ port and password. - Holman WX8 8 sprinkler irrigation controller - Qoto 03 smart water valve / sprinkler controller - Qoto 05 smart water valve / sprinkler controller -- SH07-8 / SH07S-TY smart sprinkler controller (sold as Aquarobo and other brands) +- SH07-8 / SH07S-TY smart sprinkler controller (sold as Aquarobo, Leictory LK06 and other brands) - Zemismart DP-WBS01 8-zone sprinkler controller (also sold as Benexmart and other brands) ### Miscellaneous @@ -717,6 +721,7 @@ port and password. - PH-W218 water quality monitor - PlantsIO Ivy smart planter - PV28-CW 8 in 1 air quality monitor +- RTCZ-03 human presence sensor - SD123 HPR01 human presence radar - Silvercrest coffee maker - SNT957W-TDE temperature sensor diff --git a/custom_components/tuya_local/devices/human_presence_detector.yaml b/custom_components/tuya_local/devices/rtcz03_presencesensor.yaml similarity index 100% rename from custom_components/tuya_local/devices/human_presence_detector.yaml rename to custom_components/tuya_local/devices/rtcz03_presencesensor.yaml From 42017236dedca990027e1a437260c3c76f4cec7e Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 28 Jul 2024 20:52:13 +0900 Subject: [PATCH 117/169] Add support for Woods WDD90 dehumidifier Issue #1942 --- ACKNOWLEDGEMENTS.md | 2 +- DEVICES.md | 1 + .../devices/wood_wdd90_dehumidifier.yaml | 139 ++++++++++++++++++ 3 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 custom_components/tuya_local/devices/wood_wdd90_dehumidifier.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index a636bde600..b2fbdbef99 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -471,7 +471,7 @@ Further device support has been made with the assistance of users. Please consid - [ninjajim17](https://github.com/ninjajim17) for assisting with support for Carro humidifiers. - [AnthonyBe](https://github.com/AnthonyBe) for assisting with support for Eglo ceiling fans. - [spawnax](https://github.com/spawnax) for assisting with support for EVSun EV chargers. -- [madmalkav](https://github.com/madmalkav) for assisting with support for Mellerware Comfy electric radiators. +- [madmalkav](https://github.com/madmalkav) for assisting with support for Mellerware Comfy electric radiator and Woods WDD90 dehumidifier. - [arhimidis64](https://github.com/arhimidis64) for assisting with support for Inventor Leon air conditioners. - [ceinmart](https://github.com/ceinmart) for assisting with support for Moes 4-gang switches. - [mihasybn](https://github.com/mihasybn) for assisting with support for Idea Heating Belt air conditioners. diff --git a/DEVICES.md b/DEVICES.md index a4cfb2d8d4..f5c240e25c 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -298,6 +298,7 @@ - Tesla Smart XL dehumidifier - VacPlus dehumidifier - Vivosun DE0003 dehumidifier +- Woods WDD90 dehumidifier ### Humidifiers diff --git a/custom_components/tuya_local/devices/wood_wdd90_dehumidifier.yaml b/custom_components/tuya_local/devices/wood_wdd90_dehumidifier.yaml new file mode 100644 index 0000000000..f54fa17412 --- /dev/null +++ b/custom_components/tuya_local/devices/wood_wdd90_dehumidifier.yaml @@ -0,0 +1,139 @@ +name: Dehumidifier +products: + - id: kiiuovcdvvgxnj0n + name: Woods WDD90 +primary_entity: + entity: humidifier + class: dehumidifier + dps: + - id: 1 + type: boolean + name: switch + - id: 3 + type: string + name: humidity + range: + min: 35 + max: 80 + mapping: + - dps_val: "35" + value: 35 + step: 5 + - dps_val: "40" + value: 40 + step: 5 + - dps_val: "45" + value: 45 + step: 5 + - dps_val: "50" + value: 50 + step: 5 + - dps_val: "55" + value: 55 + step: 5 + - dps_val: "60" + value: 60 + step: 5 + - dps_val: "65" + value: 65 + step: 5 + - dps_val: "70" + value: 70 + step: 5 + - dps_val: "75" + value: 75 + step: 5 + - dps_val: "80" + value: 80 + step: 5 + - id: 6 + type: integer + name: current_humidity +secondary_entities: + - entity: fan + translation_key: fan_with_presets + dps: + - id: 1 + type: boolean + name: switch + - id: 4 + type: string + name: preset_mode + mapping: + - dps_val: "1" + value: sleep + - dps_val: "2" + value: normal + - dps_val: "3" + value: strong + - dps_val: "A" + value: smart + - id: 8 + type: boolean + name: oscillate + - entity: switch + translation_key: ionizer + category: config + dps: + - id: 10 + type: boolean + name: switch + - entity: lock + translation_key: child_lock + category: config + dps: + - id: 16 + type: boolean + name: lock + - entity: select + translation_key: timer + category: config + dps: + - id: 17 + type: string + name: option + mapping: + - dps_val: cancel + value: "Off" + - dps_val: "1h" + value: "1 hour" + - dps_val: "2h" + value: "2 hours" + - dps_val: "3h" + value: "3 hours" + - dps_val: "4h" + value: "4 hours" + - dps_val: "5h" + value: "5 hours" + - dps_val: "6h" + value: "6 hours" + - dps_val: "7h" + value: "7 hours" + - dps_val: "8h" + value: "8 hours" + - entity: binary_sensor + class: problem + category: diagnostic + dps: + - id: 19 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - dps_val: 16 + value: false + - value: true + - id: 19 + type: bitfield + name: fault_code + - entity: binary_sensor + translation_key: tank_full + dps: + - id: 19 + type: bitfield + name: sensor + mapping: + - dps_val: 16 + value: true + - value: false From c648bed9f012760c8ea13e8dc6124963ea1b4757 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 28 Jul 2024 21:35:24 +0900 Subject: [PATCH 118/169] Add support for SOP10 water sprinkler Issue #1964 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 5 + .../tuya_local/devices/sop10_sprinkler.yaml | 128 ++++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 custom_components/tuya_local/devices/sop10_sprinkler.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index b2fbdbef99..39f4c4e729 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -606,3 +606,4 @@ Further device support has been made with the assistance of users. Please consid - [levineds](https://github.com/levineds) for contributing support for Moes motion sensor smart switch. - [tomassanjuann](https://github.com/tomassanjuann) for contributing support for Tera W01 EV charger. - [rorydcampbell](https://github.com/rorydcampbell) for comtributing support for WellToBe WB S36D pet feeder. +- [FreemanJD](https://github.com/FreemanJD) for assisting with support for SOP10 water sprinkler. diff --git a/DEVICES.md b/DEVICES.md index f5c240e25c..8ff07f3b24 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -763,6 +763,7 @@ port and password. - PT216/PT19DB-2 temperature and humidity sensor - SGS01 plant sensor - Smart Ape solar garden light +- SOP10 water sprinkler - TCS024B plant moisture sensor - TH05 temperature and humidity sensor - XCase NX-4964 lock box @@ -772,6 +773,10 @@ port and password. ### Devices supported via IR hubs +In general IR hubs are supported as generic IR remote controllers. +Some specialised devices have built-in sensors to also present other +entity types as sub devices. + - Air conditioner / heatpump via Moes IR hub - Neo IR Air Conditioner controller diff --git a/custom_components/tuya_local/devices/sop10_sprinkler.yaml b/custom_components/tuya_local/devices/sop10_sprinkler.yaml new file mode 100644 index 0000000000..27ac38973f --- /dev/null +++ b/custom_components/tuya_local/devices/sop10_sprinkler.yaml @@ -0,0 +1,128 @@ +name: Water sprinkler +products: + - id: nxquc5lb + name: SOP10 +primary_entity: + entity: valve + class: water + dps: + - id: 1 + type: boolean + name: valve + - id: 12 + type: string + name: work_state +secondary_entities: + - entity: binary_sensor + class: problem + category: diagnostic + dps: + - id: 4 + type: bitfield + name: sensor + optional: true + mapping: + - dps_val: 0 + value: false + - dps_val: null + value: false + - value: true + - id: 4 + type: bitfield + optional: true + name: fault_code + - entity: sensor + class: battery + dps: + - id: 7 + type: integer + name: sensor + unit: "%" + class: measurement + - entity: sensor + name: Total use time + class: duration + category: diagnostic + dps: + - id: 9 + type: integer + name: sensor + unit: s + class: measurement + - entity: select + name: Weather delay + icon: "mdi:weather-cloudy-clock" + category: config + dps: + - id: 10 + type: string + name: option + mapping: + - dps_val: cancel + value: "Off" + - dps_val: "24h" + value: "24 hours" + - dps_val: "48h" + value: "48 hours" + - dps_val: "72h" + value: "72 hours" + - entity: number + translation_key: timer + category: config + dps: + - id: 11 + type: integer + name: value + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + - id: 16 + type: string + name: cycle_timer + optional: true + - id: 17 + type: string + name: schedule + optional: true + - entity: sensor + name: Weather + icon: "mdi:weather-cloudy-alert" + class: enum + dps: + - id: 13 + type: string + name: sensor + optional: true + mapping: + - dps_val: null + value: no_forecast + - dps_val: sunny + value: sunny + icon: "mdi:weather-sunny" + - dps_val: cloudy + value: cloudy + icon: "mdi:weather-cloudy" + - dps_val: rainy + value: rainy + icon: "mdi:weather-rainy" + - entity: switch + name: Weather + icon: "mdi:weather-partly-cloudy" + category: config + dps: + - id: 14 + type: boolean + name: switch + - entity: sensor + name: Last use time + class: duration + category: diagnostic + dps: + - id: 15 + type: integer + name: sensor + unit: s + class: measurement From b1c240ed4de85739da70c3c0e887d8f645a9c084 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Aguilera Date: Mon, 29 Jul 2024 12:49:31 +0200 Subject: [PATCH 119/169] fix cecotec_fan_light speed to integer --- .../tuya_local/devices/cecotec_fan_light.yaml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/custom_components/tuya_local/devices/cecotec_fan_light.yaml b/custom_components/tuya_local/devices/cecotec_fan_light.yaml index d1109a5a11..3adfbf3fb3 100644 --- a/custom_components/tuya_local/devices/cecotec_fan_light.yaml +++ b/custom_components/tuya_local/devices/cecotec_fan_light.yaml @@ -25,20 +25,10 @@ primary_entity: value: custom - id: 3 name: speed - type: string - mapping: - - dps_val: "1" - value: 17 - - dps_val: "2" - value: 33 - - dps_val: "3" - value: 50 - - dps_val: "4" - value: 67 - - dps_val: "5" - value: 83 - - dps_val: "6" - value: 100 + type: integer + range: + min: 1 + max: 6 - id: 8 name: direction type: string From 03c1d98cc46fbeff718e00871eb1b6d15c89d891 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 29 Jul 2024 21:30:48 +0900 Subject: [PATCH 120/169] BLE YL01: dp 105 can be used to force updates Issue #2056 --- .../tuya_local/devices/ble_yl01_watertester.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/custom_components/tuya_local/devices/ble_yl01_watertester.yaml b/custom_components/tuya_local/devices/ble_yl01_watertester.yaml index 9955c260f1..54d708699d 100644 --- a/custom_components/tuya_local/devices/ble_yl01_watertester.yaml +++ b/custom_components/tuya_local/devices/ble_yl01_watertester.yaml @@ -87,11 +87,16 @@ secondary_entities: - id: 104 type: boolean name: switch + - entity: button + name: Update + category: config + dps: - id: 105 type: integer - name: backlight_value - # may be brightness, but only log we have has 0 value and range - # is unusally high - up to 16M + name: button + mapping: + - dps_val: 1 + value: true - entity: number name: Maximum pH class: ph From 7e6c995bde8ad594728cda7a0c90148556884ef0 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 30 Jul 2024 21:58:22 +0900 Subject: [PATCH 121/169] Add support for Wolf Guard alarm system Issue #1972 - bump version, anticipating no release before August --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + .../devices/wolfguard_wt2r_alarm.yaml | 257 ++++++++++++++++++ custom_components/tuya_local/manifest.json | 2 +- 4 files changed, 260 insertions(+), 1 deletion(-) create mode 100644 custom_components/tuya_local/devices/wolfguard_wt2r_alarm.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 39f4c4e729..2c99f08fc7 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -607,3 +607,4 @@ Further device support has been made with the assistance of users. Please consid - [tomassanjuann](https://github.com/tomassanjuann) for contributing support for Tera W01 EV charger. - [rorydcampbell](https://github.com/rorydcampbell) for comtributing support for WellToBe WB S36D pet feeder. - [FreemanJD](https://github.com/FreemanJD) for assisting with support for SOP10 water sprinkler. +- [liquidand](https://github.com/liquidand) for assisting with support for Wolf Guard WTR alarm. diff --git a/DEVICES.md b/DEVICES.md index 8ff07f3b24..436f4fa87e 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -652,6 +652,7 @@ port and password. - BlitzWolf BW-IS6 security alarm system - GauTone PG-103 security alarm system - Smart alarm siren (unbranded) +- Wolf Guard WT2R alarm system - ZX-DB11 doorbell and alarm system - ZX-DB11B doorbell and alarm system - ZX-G30 alarm system diff --git a/custom_components/tuya_local/devices/wolfguard_wt2r_alarm.yaml b/custom_components/tuya_local/devices/wolfguard_wt2r_alarm.yaml new file mode 100644 index 0000000000..9fb3aea63c --- /dev/null +++ b/custom_components/tuya_local/devices/wolfguard_wt2r_alarm.yaml @@ -0,0 +1,257 @@ +name: Alarm system +products: + - id: dscqpiq1gdfltjt3 + name: Wolf Guard WT2R +primary_entity: + entity: alarm_control_panel + dps: + - id: 1 + type: string + name: alarm_state + mapping: + - dps_val: disarmed + value: disarmed + - dps_val: arm + value: armed_away + - dps_val: home + value: armed_home + - id: 44 + type: boolean + optional: true + name: trigger + mapping: + - dps_val: null + constraint: master_state + conditions: + - dps_val: normal + value: false + hidden: true + - dps_val: alarm + value: true + hidden: true + - id: 32 + type: string + name: master_state + - id: 24 + type: string + optional: true + name: zone_attribute + - id: 33 + type: string + name: master_information + - id: 36 + type: string + optional: true + name: sub_class + - id: 37 + type: string + optional: true + name: sub_type + - id: 38 + type: string + optional: true + name: sub_admin + - id: 39 + type: string + optional: true + name: sub_state + - id: 101 + type: string + optional: true + name: child_device_action + +secondary_entities: + - entity: number + name: Arm delay + category: config + icon: "mdi:camera-timer" + dps: + - id: 2 + type: integer + name: value + unit: s + range: + min: 0 + max: 99 + - entity: siren + category: config + dps: + - id: 3 + type: integer + name: duration + unit: min + range: + min: 1 + max: 5 + - id: 4 + type: boolean + name: tone + mapping: + - dps_val: false + value: "off" + - dps_val: true + value: "on" + - id: 25 + type: boolean + name: volume_level + mapping: + - dps_val: false + value: 1.0 + - dps_val: true + value: 0.1 + - entity: binary_sensor + class: tamper + category: diagnostic + dps: + - id: 9 + type: boolean + optional: true + name: sensor + mapping: + - dps_val: null + value: false + - entity: switch + translation_key: keytone + category: config + dps: + - id: 12 + type: boolean + name: switch + - entity: binary_sensor + class: battery_charging + category: diagnostic + dps: + - id: 15 + type: boolean + name: sensor + - entity: sensor + class: battery + category: diagnostic + dps: + - id: 16 + type: integer + name: sensor + unit: "%" + class: measurement + - entity: switch + name: Low battery alarm + category: config + dps: + - id: 17 + type: boolean + name: switch + - entity: sensor + name: Mobile network status + class: enum + category: diagnostic + dps: + - id: 23 + type: string + name: sensor + mapping: + - dps_val: normal + value: Normal + icon: "mdi:phone-classic" + - dps_val: network_no + value: "No signal" + icon: "mdi:signal-off" + - dps_val: phone_no + value: "No phone service" + icon: "mdi:phone-off" + - dps_val: sim_card_no + value: "No SIM card" + icon: "mdi:sim-off" + - dps_val: network_search + value: Searching for network + icon: "mdi:signal-cellular-outline" + - dps_val: signal_level_1 + value: Signal level 1 + icon: "mdi:signal-cellular-1" + - dps_val: signal_level_2 + value: Signal level 2 + icon: "mdi:signal-cellular-1" + - dps_val: signal_level_3 + value: Signal level 3 + icon: "mdi:signal-cellular-2" + - dps_val: signal_level_4 + value: Signal level 4 + icon: "mdi:signal-cellular-2" + - dps_val: signal_level_5 + value: Signal level 5 + icon: "mdi:signal-cellular-3" + - id: 18 + type: string + optional: true + name: alarm_call_number + - id: 19 + type: string + optional: true + name: alarm_sms_number + - entity: switch + name: Push notifications + category: config + dps: + - id: 27 + type: boolean + name: switch + - id: 26 + type: string + optional: true + name: alarm_msg + - entity: number + name: Alarm delay + category: config + icon: "mdi:camera-timer" + dps: + - id: 28 + type: integer + name: value + unit: s + range: + min: 0 + max: 99 + - entity: switch + name: Doorbell + icon: "mdi:doorbell" + category: config + dps: + - id: 29 + type: boolean + name: switch + + - entity: button + name: Factory reset + class: restart + category: config + dps: + - id: 34 + type: boolean + optional: true + name: button + - entity: select + name: Language + icon: "mdi:translate" + category: config + dps: + - id: 40 + type: string + name: option + mapping: + - dps_val: chinese_simplified + value: 中文简化字 + - dps_val: english + value: English + - dps_val: french + value: Français + - dps_val: italian + value: Italiano + - dps_val: german + value: Deutsch + - dps_val: spanish + value: Español + - dps_val: portuguese + value: Português + - dps_val: russian + value: Русский + - dps_val: japanese + value: 日本語 diff --git a/custom_components/tuya_local/manifest.json b/custom_components/tuya_local/manifest.json index 8caf23a5ee..6860377d92 100644 --- a/custom_components/tuya_local/manifest.json +++ b/custom_components/tuya_local/manifest.json @@ -15,5 +15,5 @@ "tinytuya==1.15.1", "tuya-device-sharing-sdk>=0.1.9,<=0.2.99" ], - "version": "2024.7.1" + "version": "2024.8.0" } From 87b0451c7f1d89a00e6ae8d5a93461c63e93d6a5 Mon Sep 17 00:00:00 2001 From: Brian Nichols <16408070+cw-cdz@users.noreply.github.com> Date: Thu, 21 Mar 2024 14:56:13 +0000 Subject: [PATCH 122/169] Add support for HeatStorm HS-1500 heater --- .../devices/heatstorm_hs1500_heater.yaml | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 custom_components/tuya_local/devices/heatstorm_hs1500_heater.yaml diff --git a/custom_components/tuya_local/devices/heatstorm_hs1500_heater.yaml b/custom_components/tuya_local/devices/heatstorm_hs1500_heater.yaml new file mode 100644 index 0000000000..86d3eb2c20 --- /dev/null +++ b/custom_components/tuya_local/devices/heatstorm_hs1500_heater.yaml @@ -0,0 +1,132 @@ +name: Heatstorm heater +products: + - id: gifk0oubmovuz3ky + name: HS-1500 +primary_entity: + entity: climate + dps: + - id: 1 + type: boolean + name: hvac_mode + mapping: + - dps_val: false + value: "off" + - dps_val: true + value: heat + - id: 2 + type: integer + name: temperature + range: + min: 4 + max: 37 + mapping: + - constraint: temperature_unit + conditions: + - dps_val: f + value_redirect: set_temp_f + range: + min: 40 + max: 99 + - id: 3 + type: integer + name: current_temperature + mapping: + - constraint: temperature_unit + conditions: + - dps_val: f + value_redirect: cur_temp_f + - id: 4 + type: string + name: preset_mode + mapping: + - dps_val: Auto + value: comfort + - dps_val: Low + value: eco + - dps_val: High + value: boost + - id: 13 + type: bitfield + name: fault_code + mapping: + - dps_val: 1 + value: Temp sensor fault + - dps_val: 2 + value: Tilt over + - dps_val: 3 + value: Over-voltage + - id: 19 + type: string + name: temperature_unit + mapping: + - dps_val: c + value: C + - dps_val: f + value: F + - id: 20 + type: integer + name: set_temp_f + range: + min: 40 + max: 99 + hidden: true + - id: 21 + type: integer + name: cur_temp_f + hidden: true + +secondary_entities: + - entity: light + name: Display + category: config + dps: + - id: 5 + name: brightness + type: string + mapping: + - dps_val: "Off" + value: 0 + - dps_val: "10" + value: 26 + - dps_val: "50" + value: 128 + - dps_val: "100" + value: 255 + - entity: lock + name: Child lock + icon: "mdi:hand-back-right-off" + category: config + dps: + - id: 7 + type: boolean + name: lock + mapping: + - dps_val: true + value: false + - dps_val: false + value: true + - entity: binary_sensor + name: Fault + class: problem + category: diagnostic + dps: + - id: 13 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - entity: select + name: Temperature unit + icon: "mdi:temperature-celsius" + category: config + dps: + - id: 19 + type: string + name: option + mapping: + - dps_val: c + value: Celsius + - dps_val: f + value: Fahrenheit From 51e6c178593e21f3f29e51d40c00b75b94143a8f Mon Sep 17 00:00:00 2001 From: Brian <16408070+cw-cdz@users.noreply.github.com> Date: Mon, 29 Jul 2024 12:49:13 +0000 Subject: [PATCH 123/169] Comments, verify bitfield, etc. --- .../devices/heatstorm_hs1500_heater.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/custom_components/tuya_local/devices/heatstorm_hs1500_heater.yaml b/custom_components/tuya_local/devices/heatstorm_hs1500_heater.yaml index 86d3eb2c20..4e1954a2cf 100644 --- a/custom_components/tuya_local/devices/heatstorm_hs1500_heater.yaml +++ b/custom_components/tuya_local/devices/heatstorm_hs1500_heater.yaml @@ -4,6 +4,7 @@ products: name: HS-1500 primary_entity: entity: climate + translation_only_key: heater dps: - id: 1 type: boolean @@ -53,7 +54,7 @@ primary_entity: value: Temp sensor fault - dps_val: 2 value: Tilt over - - dps_val: 3 + - dps_val: 4 value: Over-voltage - id: 19 type: string @@ -74,10 +75,9 @@ primary_entity: type: integer name: cur_temp_f hidden: true - secondary_entities: - entity: light - name: Display + translation_key: display category: config dps: - id: 5 @@ -93,8 +93,7 @@ secondary_entities: - dps_val: "100" value: 255 - entity: lock - name: Child lock - icon: "mdi:hand-back-right-off" + translation_key: child_lock category: config dps: - id: 7 @@ -106,7 +105,6 @@ secondary_entities: - dps_val: false value: true - entity: binary_sensor - name: Fault class: problem category: diagnostic dps: @@ -118,8 +116,7 @@ secondary_entities: value: false - value: true - entity: select - name: Temperature unit - icon: "mdi:temperature-celsius" + translation_key: temperature_unit category: config dps: - id: 19 @@ -127,6 +124,6 @@ secondary_entities: name: option mapping: - dps_val: c - value: Celsius + value: celsius - dps_val: f - value: Fahrenheit + value: fahrenheit From 84ca0edc1b88a349623d2f7e840fae9cabd64d98 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 30 Jul 2024 22:20:00 +0900 Subject: [PATCH 124/169] Heatstorm HS1500: minor tweaks before merge - move branding to products section - move fault description to problem sensor - add raw fault_code to problem sensor PR #1763 --- .../devices/heatstorm_hs1500_heater.yaml | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/custom_components/tuya_local/devices/heatstorm_hs1500_heater.yaml b/custom_components/tuya_local/devices/heatstorm_hs1500_heater.yaml index 4e1954a2cf..f2a84af716 100644 --- a/custom_components/tuya_local/devices/heatstorm_hs1500_heater.yaml +++ b/custom_components/tuya_local/devices/heatstorm_hs1500_heater.yaml @@ -1,7 +1,7 @@ -name: Heatstorm heater +name: Heater products: - id: gifk0oubmovuz3ky - name: HS-1500 + name: Heatstorm HS-1500 primary_entity: entity: climate translation_only_key: heater @@ -46,16 +46,6 @@ primary_entity: value: eco - dps_val: High value: boost - - id: 13 - type: bitfield - name: fault_code - mapping: - - dps_val: 1 - value: Temp sensor fault - - dps_val: 2 - value: Tilt over - - dps_val: 4 - value: Over-voltage - id: 19 type: string name: temperature_unit @@ -115,6 +105,19 @@ secondary_entities: - dps_val: 0 value: false - value: true + - id: 13 + type: bitfield + name: fault_code + - id: 13 + type: bitfield + name: description + mapping: + - dps_val: 1 + value: Temp sensor fault + - dps_val: 2 + value: Tilt over + - dps_val: 4 + value: Over-voltage - entity: select translation_key: temperature_unit category: config From 23f17ad317507096975cbf64f2fd5cc6fb798459 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 30 Jul 2024 22:32:23 +0900 Subject: [PATCH 125/169] Docs for PR #1763 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + 2 files changed, 2 insertions(+) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 2c99f08fc7..ac07a31d08 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -608,3 +608,4 @@ Further device support has been made with the assistance of users. Please consid - [rorydcampbell](https://github.com/rorydcampbell) for comtributing support for WellToBe WB S36D pet feeder. - [FreemanJD](https://github.com/FreemanJD) for assisting with support for SOP10 water sprinkler. - [liquidand](https://github.com/liquidand) for assisting with support for Wolf Guard WTR alarm. +- [cw-cdz](https://github.com/cw-cdz) for contributing support for Heatstorm HS-1500 heater. diff --git a/DEVICES.md b/DEVICES.md index 436f4fa87e..679e999d39 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -26,6 +26,7 @@ - Eurom Wall Designheat 2000 heater - Goldair heater models beginning with the code GPPH, GCPV, GECO, PH-ET - Hama radiator controller +- Heatstorm HS-1500 heater - Heatstorm HS-6000-GC heavy duty heater - Herschel infrared heater - HJZ oil column radiator From 016480eb38cfccba5e340f9c62262708905567ed Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 31 Jul 2024 19:20:52 +0900 Subject: [PATCH 126/169] Add support for Nedis ZBRC10WT remote control Issue #1867 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + .../devices/nedis_zbrc10wt_remotecontrol.yaml | 75 +++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 custom_components/tuya_local/devices/nedis_zbrc10wt_remotecontrol.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index ac07a31d08..1bb6feace7 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -609,3 +609,4 @@ Further device support has been made with the assistance of users. Please consid - [FreemanJD](https://github.com/FreemanJD) for assisting with support for SOP10 water sprinkler. - [liquidand](https://github.com/liquidand) for assisting with support for Wolf Guard WTR alarm. - [cw-cdz](https://github.com/cw-cdz) for contributing support for Heatstorm HS-1500 heater. +- [sveos](https://github.com/sveos) for assisting with support for Nedis ZBRC10WT remote contol. diff --git a/DEVICES.md b/DEVICES.md index 679e999d39..d3c108c3ac 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -795,6 +795,7 @@ entity types as sub devices. - Moes RGBCW lightbulb - Moes ZHT-002 thermostat - MultiIR MIR-TE100-TY temperature and humidity sensor +- Nedis ZBRC10WT 4 button remote control - Nedis ZBSD10WT door/window sensor - Nedis ZBSC10WT temperature and humidity sensor - PY321-Z-TY energy meter diff --git a/custom_components/tuya_local/devices/nedis_zbrc10wt_remotecontrol.yaml b/custom_components/tuya_local/devices/nedis_zbrc10wt_remotecontrol.yaml new file mode 100644 index 0000000000..71fa5c7ddd --- /dev/null +++ b/custom_components/tuya_local/devices/nedis_zbrc10wt_remotecontrol.yaml @@ -0,0 +1,75 @@ +name: Remote control +products: + - id: fsiepnrh + name: Nedis ZBRC10WT +primary_entity: + entity: event + name: Button 0 + class: button + dps: + - id: 29 + type: string + name: event + optional: true + mapping: + - dps_val: null + value: null + - value: pressed + - id: 29 + type: string + name: code +secondary_entity: + - entity: event + name: Button 1 + class: button + dps: + - id: 27 + type: string + name: event + optional: true + mapping: + - dps_val: null + value: null + - value: pressed + - id: 27 + type: string + name: code + - entity: event + name: Button A + class: button + dps: + - id: 28 + type: string + name: event + optional: true + mapping: + - dps_val: null + value: null + - value: pressed + - id: 28 + type: string + name: code + - entity: event + name: Button B + class: button + dps: + - id: 26 + type: string + name: event + optional: true + mapping: + - dps_val: null + value: null + - value: pressed + - id: 26 + type: string + name: code + - entity: sensor + class: battery + category: diagnostic + dps: + - id: 3 + type: integer + name: sensor + unit: "%" + class: measurement From 99da79a8c6aa9dbc7ff26c47f4e6d0435d8aaee5 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 31 Jul 2024 19:47:09 +0900 Subject: [PATCH 127/169] Nedis ZBRC10WT: Typo --- .../tuya_local/devices/nedis_zbrc10wt_remotecontrol.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/nedis_zbrc10wt_remotecontrol.yaml b/custom_components/tuya_local/devices/nedis_zbrc10wt_remotecontrol.yaml index 71fa5c7ddd..9c053c6fe5 100644 --- a/custom_components/tuya_local/devices/nedis_zbrc10wt_remotecontrol.yaml +++ b/custom_components/tuya_local/devices/nedis_zbrc10wt_remotecontrol.yaml @@ -18,7 +18,7 @@ primary_entity: - id: 29 type: string name: code -secondary_entity: +secondary_entities: - entity: event name: Button 1 class: button From b831842432d3d1996463870c84fb86275d14a33c Mon Sep 17 00:00:00 2001 From: Bond <31829007+RoadkillUK@users.noreply.github.com> Date: Sun, 21 Jul 2024 19:45:09 +0100 Subject: [PATCH 128/169] Els Pet Spaceship Automatic Litter Box Configuration for the Els Pet Spaceship Automatic Litter Box https://www.elspet.com/products/self-cleaning-cat-litter-box-toilet --- elspet_cat_litterbox.yaml | 197 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 elspet_cat_litterbox.yaml diff --git a/elspet_cat_litterbox.yaml b/elspet_cat_litterbox.yaml new file mode 100644 index 0000000000..60a087a24e --- /dev/null +++ b/elspet_cat_litterbox.yaml @@ -0,0 +1,197 @@ +name: Cat litter box +products: + - id: asx54fyagpyhxtej + name: elspet smart litter box +primary_entity: + entity: switch + name: Power + category: config + icon: "mdi:power" + dps: + - id: 101 + type: boolean + name: switch +secondary_entities: + - entity: sensor + name: Status + category: diagnostic + class: enum + dps: + - id: 114 + type: string + name: sensor + - entity: button + name: Manual Clean + category: config + icon: "mdi:shimmer" + dps: + - id: 102 + type: boolean + name: button + - entity: number + name: Clean Wait Time + category: config + icon: "mdi:timer" + dps: + - id: 103 + type: integer + name: value + unit: s + range: + min: 60 + max: 1800 + - entity: switch + name: Sleep Mode + icon: "mdi:power-sleep" + category: config + dps: + - id: 109 + type: boolean + name: switch + - entity: number + name: Sleep Begin + category: config + icon: "mdi:timer" + dps: + - id: 110 + type: integer + name: value + unit: s + range: + min: 0 + max: 1440 + - entity: number + name: Sleep End + category: config + icon: "mdi:timer" + dps: + - id: 111 + type: integer + name: value + unit: s + range: + min: 0 + max: 1440 + - entity: switch + name: Auto Deodorize + category: config + icon: "mdi:flower" + dps: + - id: 106 + type: boolean + name: switch + - entity: number + name: Deodorize Time + category: config + icon: "mdi:timer" + dps: + - id: 107 + type: integer + name: value + unit: s + range: + min: 120 + max: 1800 + - entity: switch + name: UV + category: config + icon: "mdi:flower" + dps: + - id: 104 + type: boolean + name: switch + - entity: number + name: Deodorize Time + category: config + icon: "mdi:timer" + dps: + - id: 105 + type: integer + name: value + unit: s + range: + min: 120 + max: 1800 + - entity: switch + name: Light Ring + icon: "mdi:globe-light-outline" + category: config + dps: + - id: 109 + type: boolean + name: switch + - entity: binary_sensor + class: problem + category: diagnostic + dps: + - id: 118 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - id: 118 + type: bitfield + name: fault_code + - entity: sensor + name: Defecation Distribution + icon: "mdi:emoticon-poop" + category: diagnostic + dps: + - id: 112 + type: integer + name: sensor + unit: Visits + - entity: sensor + name: Average Time Spent Today + icon: "mdi:emoticon-poop" + category: diagnostic + class: duration + dps: + - id: 113 + type: integer + name: sensor + unit: s + class: measurement + - entity: binary_sensor + name: UV State + icon: mdi:sun-wireless + category: diagnostic + dps: + - id: 115 + type: boolean + name: sensor + - entity: binary_sensor + name: Deodorant State + icon: mdi:spray + category: diagnostic + dps: + - id: 116 + type: boolean + name: sensor + - entity: sensor + name: Sand Reminder + icon: mdi:tray + category: diagnostic + class: enum + dps: + - id: 117 + type: string + name: sensor + - entity: button + name: Reset Litter + icon: "mdi:delete-empty" + category: config + dps: + - id: 119 + type: boolean + name: button + - entity: button + name: Full Reset + icon: "mdi:delete-empty" + category: config + dps: + - id: 120 + type: boolean + name: button From 0b51786d34768301ef17c6f30bc9e7645df7c5c4 Mon Sep 17 00:00:00 2001 From: Bond <31829007+RoadkillUK@users.noreply.github.com> Date: Mon, 22 Jul 2024 14:40:21 +0100 Subject: [PATCH 129/169] Add files via upload --- .../devices/elspet_cat_litterbox.yaml | 197 ++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 custom_components/tuya_local/devices/elspet_cat_litterbox.yaml diff --git a/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml b/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml new file mode 100644 index 0000000000..e9b42e8361 --- /dev/null +++ b/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml @@ -0,0 +1,197 @@ +name: Cat Litter Box +products: + - id: asx54fyagpyhxtej + name: elspet smart litter box +primary_entity: + entity: switch + name: Power + category: config + icon: "mdi:power" + dps: + - id: 101 + type: boolean + name: switch +secondary_entities: + - entity: sensor + name: Status + category: diagnostic + class: enum + dps: + - id: 114 + type: string + name: sensor + - entity: button + name: Manual Clean + category: config + icon: "mdi:shimmer" + dps: + - id: 102 + type: boolean + name: button + - entity: number + name: Clean Wait Time + category: config + icon: "mdi:timer" + dps: + - id: 103 + type: integer + name: value + unit: s + range: + min: 60 + max: 1800 + - entity: switch + name: Sleep Mode + icon: "mdi:power-sleep" + category: config + dps: + - id: 109 + type: boolean + name: switch + - entity: number + name: Sleep Begin + category: config + icon: "mdi:timer" + dps: + - id: 110 + type: integer + name: value + unit: s + range: + min: 0 + max: 1440 + - entity: number + name: Sleep End + category: config + icon: "mdi:timer" + dps: + - id: 111 + type: integer + name: value + unit: s + range: + min: 0 + max: 1440 + - entity: switch + name: Auto Deodorize + category: config + icon: "mdi:flower" + dps: + - id: 106 + type: boolean + name: switch + - entity: number + name: Deodorize Time + category: config + icon: "mdi:timer" + dps: + - id: 107 + type: integer + name: value + unit: s + range: + min: 120 + max: 1800 + - entity: switch + name: UV + category: config + icon: "mdi:flower" + dps: + - id: 104 + type: boolean + name: switch + - entity: number + name: Deodorize Time + category: config + icon: "mdi:timer" + dps: + - id: 105 + type: integer + name: value + unit: s + range: + min: 120 + max: 1800 + - entity: switch + name: Light Ring + icon: "mdi:globe-light-outline" + category: config + dps: + - id: 108 + type: boolean + name: switch + - entity: binary_sensor + class: problem + category: diagnostic + dps: + - id: 118 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - id: 118 + type: bitfield + name: fault_code + - entity: sensor + name: Defecation Distribution + icon: "mdi:emoticon-poop" + category: diagnostic + dps: + - id: 112 + type: integer + name: sensor + unit: Visits + - entity: sensor + name: Average Time Spent Today + icon: "mdi:emoticon-poop" + category: diagnostic + class: duration + dps: + - id: 113 + type: integer + name: sensor + unit: s + class: measurement + - entity: binary_sensor + name: UV State + icon: mdi:sun-wireless + category: diagnostic + dps: + - id: 115 + type: boolean + name: sensor + - entity: binary_sensor + name: Deodorant State + icon: mdi:spray + category: diagnostic + dps: + - id: 116 + type: boolean + name: sensor + - entity: sensor + name: Sand Reminder + icon: mdi:tray + category: diagnostic + class: enum + dps: + - id: 117 + type: string + name: sensor + - entity: button + name: Reset Litter + icon: "mdi:delete-empty" + category: config + dps: + - id: 119 + type: boolean + name: button + - entity: button + name: Full Reset + icon: "mdi:delete-empty" + category: config + dps: + - id: 120 + type: boolean + name: button From c299c8b159521a2d851dd78c0f53c7daf604424e Mon Sep 17 00:00:00 2001 From: RoadkillUK <31829007+RoadkillUK@users.noreply.github.com> Date: Mon, 22 Jul 2024 21:11:06 +0100 Subject: [PATCH 130/169] Update elspet_cat_litterbox.yaml Updated as requested and corrected other things. --- .../devices/elspet_cat_litterbox.yaml | 49 +++++++++++++++++-- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml b/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml index e9b42e8361..39c282deec 100644 --- a/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml +++ b/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml @@ -20,6 +20,25 @@ secondary_entities: - id: 114 type: string name: sensor + mapping: + - dps_val: power_off + icon: "mdi:power-off" + value: "Off" + - dps_val: standby + icon: "mdi:power-standby" + value: Standby + - dps_val: caking + icon: "mdi:biohazard" + value: Caking + - dps_val: cleaning + icon: "mdi:spray-bottle" + value: Cleaning + - dps_val: sleeping + icon: "mdi:sleep" + value: Sleeping + - dps_val: UV + icon: "mdi:sun-wireless" + value: UV Light On - entity: button name: Manual Clean category: config @@ -134,18 +153,30 @@ secondary_entities: - id: 118 type: bitfield name: fault_code + mapping: + - dps_val: 0 + value: "None" + icon: "mdi:check-circle" + - dps_val: 1 + value: "Stuck" + icon: "mdi:alert" + - dps_val: 2 + value: "Dislocation" + icon: "mdi:alert" + - dps_val: 3 + value: "Both" + icon: "mdi:alert" - entity: sensor - name: Defecation Distribution - icon: "mdi:emoticon-poop" + name: Clean Count + icon: "mdi:counter" category: diagnostic dps: - id: 112 type: integer name: sensor - unit: Visits - entity: sensor name: Average Time Spent Today - icon: "mdi:emoticon-poop" + icon: "mdi:clock-time-three-outline" category: diagnostic class: duration dps: @@ -179,6 +210,16 @@ secondary_entities: - id: 117 type: string name: sensor + mapping: + - dps_val: full + icon: "mdi:tray-full" + value: Full + - dps_val: half + icon: "mdi:tray-minus" + value: Half + - dps_val: empty + icon: "mdi:tray" + value: Empty - entity: button name: Reset Litter icon: "mdi:delete-empty" From 19afbf89b4bbb8c5bb933fa8c5a500094bebe0e6 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 23 Jul 2024 07:53:19 +0900 Subject: [PATCH 131/169] Delete elspet_cat_litterbox.yaml Only the file under devices is valid --- elspet_cat_litterbox.yaml | 197 -------------------------------------- 1 file changed, 197 deletions(-) delete mode 100644 elspet_cat_litterbox.yaml diff --git a/elspet_cat_litterbox.yaml b/elspet_cat_litterbox.yaml deleted file mode 100644 index 60a087a24e..0000000000 --- a/elspet_cat_litterbox.yaml +++ /dev/null @@ -1,197 +0,0 @@ -name: Cat litter box -products: - - id: asx54fyagpyhxtej - name: elspet smart litter box -primary_entity: - entity: switch - name: Power - category: config - icon: "mdi:power" - dps: - - id: 101 - type: boolean - name: switch -secondary_entities: - - entity: sensor - name: Status - category: diagnostic - class: enum - dps: - - id: 114 - type: string - name: sensor - - entity: button - name: Manual Clean - category: config - icon: "mdi:shimmer" - dps: - - id: 102 - type: boolean - name: button - - entity: number - name: Clean Wait Time - category: config - icon: "mdi:timer" - dps: - - id: 103 - type: integer - name: value - unit: s - range: - min: 60 - max: 1800 - - entity: switch - name: Sleep Mode - icon: "mdi:power-sleep" - category: config - dps: - - id: 109 - type: boolean - name: switch - - entity: number - name: Sleep Begin - category: config - icon: "mdi:timer" - dps: - - id: 110 - type: integer - name: value - unit: s - range: - min: 0 - max: 1440 - - entity: number - name: Sleep End - category: config - icon: "mdi:timer" - dps: - - id: 111 - type: integer - name: value - unit: s - range: - min: 0 - max: 1440 - - entity: switch - name: Auto Deodorize - category: config - icon: "mdi:flower" - dps: - - id: 106 - type: boolean - name: switch - - entity: number - name: Deodorize Time - category: config - icon: "mdi:timer" - dps: - - id: 107 - type: integer - name: value - unit: s - range: - min: 120 - max: 1800 - - entity: switch - name: UV - category: config - icon: "mdi:flower" - dps: - - id: 104 - type: boolean - name: switch - - entity: number - name: Deodorize Time - category: config - icon: "mdi:timer" - dps: - - id: 105 - type: integer - name: value - unit: s - range: - min: 120 - max: 1800 - - entity: switch - name: Light Ring - icon: "mdi:globe-light-outline" - category: config - dps: - - id: 109 - type: boolean - name: switch - - entity: binary_sensor - class: problem - category: diagnostic - dps: - - id: 118 - type: bitfield - name: sensor - mapping: - - dps_val: 0 - value: false - - value: true - - id: 118 - type: bitfield - name: fault_code - - entity: sensor - name: Defecation Distribution - icon: "mdi:emoticon-poop" - category: diagnostic - dps: - - id: 112 - type: integer - name: sensor - unit: Visits - - entity: sensor - name: Average Time Spent Today - icon: "mdi:emoticon-poop" - category: diagnostic - class: duration - dps: - - id: 113 - type: integer - name: sensor - unit: s - class: measurement - - entity: binary_sensor - name: UV State - icon: mdi:sun-wireless - category: diagnostic - dps: - - id: 115 - type: boolean - name: sensor - - entity: binary_sensor - name: Deodorant State - icon: mdi:spray - category: diagnostic - dps: - - id: 116 - type: boolean - name: sensor - - entity: sensor - name: Sand Reminder - icon: mdi:tray - category: diagnostic - class: enum - dps: - - id: 117 - type: string - name: sensor - - entity: button - name: Reset Litter - icon: "mdi:delete-empty" - category: config - dps: - - id: 119 - type: boolean - name: button - - entity: button - name: Full Reset - icon: "mdi:delete-empty" - category: config - dps: - - id: 120 - type: boolean - name: button From 8fa26102f44a0c1be1c97ac1133e4553690c7223 Mon Sep 17 00:00:00 2001 From: RoadkillUK <31829007+RoadkillUK@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:36:31 +0100 Subject: [PATCH 132/169] Update elspet_cat_litterbox.yaml Correcting duplicate names and rearranging the components --- .../devices/elspet_cat_litterbox.yaml | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml b/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml index 39c282deec..205b360056 100644 --- a/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml +++ b/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml @@ -60,37 +60,25 @@ secondary_entities: min: 60 max: 1800 - entity: switch - name: Sleep Mode - icon: "mdi:power-sleep" + name: UV category: config + icon: "mdi:flower" dps: - - id: 109 + - id: 104 type: boolean name: switch - entity: number - name: Sleep Begin + name: UV Time category: config icon: "mdi:timer" dps: - - id: 110 - type: integer - name: value - unit: s - range: - min: 0 - max: 1440 - - entity: number - name: Sleep End - category: config - icon: "mdi:timer" - dps: - - id: 111 + - id: 105 type: integer name: value unit: s range: - min: 0 - max: 1440 + min: 120 + max: 1800 - entity: switch name: Auto Deodorize category: config @@ -100,7 +88,7 @@ secondary_entities: type: boolean name: switch - entity: number - name: Deodorize Time + name: Deodorizer Switch category: config icon: "mdi:timer" dps: @@ -112,33 +100,45 @@ secondary_entities: min: 120 max: 1800 - entity: switch - name: UV + name: Light Ring + icon: "mdi:globe-light-outline" category: config - icon: "mdi:flower" dps: - - id: 104 + - id: 108 + type: boolean + name: switch + - entity: switch + name: Sleep Mode + icon: "mdi:power-sleep" + category: config + dps: + - id: 109 type: boolean name: switch - entity: number - name: Deodorize Time + name: Sleep Begin category: config icon: "mdi:timer" dps: - - id: 105 + - id: 110 type: integer name: value unit: s range: - min: 120 - max: 1800 - - entity: switch - name: Light Ring - icon: "mdi:globe-light-outline" + min: 0 + max: 1440 + - entity: number + name: Sleep End category: config + icon: "mdi:timer" dps: - - id: 108 - type: boolean - name: switch + - id: 111 + type: integer + name: value + unit: s + range: + min: 0 + max: 1440 - entity: binary_sensor class: problem category: diagnostic From 208f187675040b00aa4ecd4a8e9463348d425a51 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 28 Jul 2024 18:14:55 +0900 Subject: [PATCH 133/169] Elspet: naming and icon changes - change light switch to light entity - follow HA naming conventions - use class icons and names where possible - naming tweaks PR #2142 --- .../devices/elspet_cat_litterbox.yaml | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml b/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml index 205b360056..99149b4ca3 100644 --- a/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml +++ b/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml @@ -1,7 +1,7 @@ -name: Cat Litter Box +name: Cat litter box products: - id: asx54fyagpyhxtej - name: elspet smart litter box + name: Elspet Spaceship primary_entity: entity: switch name: Power @@ -40,7 +40,7 @@ secondary_entities: icon: "mdi:sun-wireless" value: UV Light On - entity: button - name: Manual Clean + name: Manual clean category: config icon: "mdi:shimmer" dps: @@ -48,9 +48,9 @@ secondary_entities: type: boolean name: button - entity: number - name: Clean Wait Time + name: Clean wait time category: config - icon: "mdi:timer" + translation_key: timer dps: - id: 103 type: integer @@ -60,15 +60,14 @@ secondary_entities: min: 60 max: 1800 - entity: switch - name: UV + translation_key: uv_sterilization category: config - icon: "mdi:flower" dps: - id: 104 type: boolean name: switch - entity: number - name: UV Time + name: UV time category: config icon: "mdi:timer" dps: @@ -80,7 +79,7 @@ secondary_entities: min: 120 max: 1800 - entity: switch - name: Auto Deodorize + name: Auto deodorize category: config icon: "mdi:flower" dps: @@ -88,7 +87,7 @@ secondary_entities: type: boolean name: switch - entity: number - name: Deodorizer Switch + name: Deodorize time category: config icon: "mdi:timer" dps: @@ -99,16 +98,14 @@ secondary_entities: range: min: 120 max: 1800 - - entity: switch - name: Light Ring - icon: "mdi:globe-light-outline" + - entity: light category: config dps: - id: 108 type: boolean name: switch - entity: switch - name: Sleep Mode + name: Sleep mode icon: "mdi:power-sleep" category: config dps: @@ -116,29 +113,33 @@ secondary_entities: type: boolean name: switch - entity: number - name: Sleep Begin + name: Sleep start category: config icon: "mdi:timer" dps: - id: 110 type: integer name: value - unit: s + unit: h range: min: 0 max: 1440 + mapping: + - scale: 60 - entity: number - name: Sleep End + name: Sleep end category: config icon: "mdi:timer" dps: - id: 111 type: integer name: value - unit: s + unit: h range: min: 0 max: 1440 + mapping: + - scale: 60 - entity: binary_sensor class: problem category: diagnostic @@ -151,7 +152,7 @@ secondary_entities: value: false - value: true - id: 118 - type: bitfield + type: integer name: fault_code mapping: - dps_val: 0 @@ -167,7 +168,7 @@ secondary_entities: value: "Both" icon: "mdi:alert" - entity: sensor - name: Clean Count + name: Clean count icon: "mdi:counter" category: diagnostic dps: @@ -175,7 +176,7 @@ secondary_entities: type: integer name: sensor - entity: sensor - name: Average Time Spent Today + name: Average time today icon: "mdi:clock-time-three-outline" category: diagnostic class: duration @@ -186,23 +187,25 @@ secondary_entities: unit: s class: measurement - entity: binary_sensor - name: UV State + name: UV sterilization icon: mdi:sun-wireless + class: running category: diagnostic dps: - id: 115 type: boolean name: sensor - entity: binary_sensor - name: Deodorant State + name: Deodorizing icon: mdi:spray + class: running category: diagnostic dps: - id: 116 type: boolean name: sensor - entity: sensor - name: Sand Reminder + name: Litter icon: mdi:tray category: diagnostic class: enum @@ -229,8 +232,8 @@ secondary_entities: type: boolean name: button - entity: button - name: Full Reset - icon: "mdi:delete-empty" + name: Full reset + class: restart category: config dps: - id: 120 From cc50c3771010a31568c425fdae74a012e0752702 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 28 Jul 2024 18:16:50 +0900 Subject: [PATCH 134/169] Elspet: missed naming convention change --- custom_components/tuya_local/devices/elspet_cat_litterbox.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml b/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml index 99149b4ca3..5f7718567c 100644 --- a/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml +++ b/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml @@ -224,7 +224,7 @@ secondary_entities: icon: "mdi:tray" value: Empty - entity: button - name: Reset Litter + name: Reset litter icon: "mdi:delete-empty" category: config dps: From d78670915056b58cb9973e016bb04afd1368a1b0 Mon Sep 17 00:00:00 2001 From: Bond <31829007+RoadkillUK@users.noreply.github.com> Date: Mon, 29 Jul 2024 09:38:44 +0100 Subject: [PATCH 135/169] Update elspet_cat_litterbox.yaml Added icon and name to Light Ring --- custom_components/tuya_local/devices/elspet_cat_litterbox.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml b/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml index 5f7718567c..5e299cbd77 100644 --- a/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml +++ b/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml @@ -99,7 +99,9 @@ secondary_entities: min: 120 max: 1800 - entity: light + name: Light Ring category: config + icon: "mdi:globe-light" dps: - id: 108 type: boolean From 71fc426a9e2fb705796078697b46954c1f19383d Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 31 Jul 2024 20:07:37 +0900 Subject: [PATCH 136/169] Elspet litterbox: undo last revert There is no value adding a name and non-matching icon to the only light entity exposed, it is better to leave these to translations and themes. --- custom_components/tuya_local/devices/elspet_cat_litterbox.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml b/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml index 5e299cbd77..5f7718567c 100644 --- a/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml +++ b/custom_components/tuya_local/devices/elspet_cat_litterbox.yaml @@ -99,9 +99,7 @@ secondary_entities: min: 120 max: 1800 - entity: light - name: Light Ring category: config - icon: "mdi:globe-light" dps: - id: 108 type: boolean From 20f069a2a49534ebe51d262f1dfce0b1e170e174 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 31 Jul 2024 20:15:24 +0900 Subject: [PATCH 137/169] Docs for PR #2142 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 1bb6feace7..ac45ad47f3 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -610,3 +610,4 @@ Further device support has been made with the assistance of users. Please consid - [liquidand](https://github.com/liquidand) for assisting with support for Wolf Guard WTR alarm. - [cw-cdz](https://github.com/cw-cdz) for contributing support for Heatstorm HS-1500 heater. - [sveos](https://github.com/sveos) for assisting with support for Nedis ZBRC10WT remote contol. +- [RoadkillUK](https://github.com/RoadkillUK) for contributing support for Els Pet Spaceship litter box. diff --git a/DEVICES.md b/DEVICES.md index d3c108c3ac..3a74104679 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -340,6 +340,7 @@ - Kogan glass 1.7L smart kettle - Setti+ KT950W smart kettle - Silvercrest 1.7L smart kettle +- Silvercrest coffee maker - Ultenic K10 air fryer - Weekett smart kettle @@ -658,18 +659,21 @@ port and password. - ZX-DB11B doorbell and alarm system - ZX-G30 alarm system -### Pet feeders +### Pet care - Catit Pixi smart fountain - Catit pet feeder (Pixi 2.2kg dispenser and 6 meal versions, and another non-Pixi branded single dispenser) - Ceres Plus pet feeder with camera +- Els Pet Spaceship pet litter box - HoneyGuardian S56 pet feeder +- Leo's Loo Too pet toilet - Nedis pet feeder - Petlibro PLAF103 pet feeder - Petlibro PLAF203 pet feeder with camera - Petoneer Fresco Hydrate Ultra pet fountain/ - PNI water feeder - Rojeco PTM-001 pet feeder (two versions) +- Tonepie T1PRO automatic cat litter box - V330L pet feeder - WellToBe Automatic Pet Feeder (WB S36D) - YP pet feeder @@ -715,7 +719,6 @@ port and password. - Kogan bidet toilet seat - Kogan KAWHTNOSLPA white noise sleep aid - Konlen/Rockson WF96L water level controller -- Leo's Loo Too pet toilet - Madimack Inverflow Pro pool pump - Mirabella Genio motion sensor - Momcozy white noise machine (2 variants) @@ -726,7 +729,6 @@ port and password. - PV28-CW 8 in 1 air quality monitor - RTCZ-03 human presence sensor - SD123 HPR01 human presence radar -- Silvercrest coffee maker - SNT957W-TDE temperature sensor - SNT957W-DE CBU temperature and humidity sensor - Sunbeam dual heated mattress pad @@ -734,7 +736,6 @@ port and password. - TH08 temperature and humidity sensor - TH16 temperature and humidity sensor - Timeguard WFPIR motion light controller -- Tonepie T1PRO automatic cat litter box - Tontine electric blanket - Valehaus SYZN119 towel warmer - WeatherStation Pro From 17cb0c480c8c509553cfd1688efa2e5121f8bbce Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 31 Jul 2024 21:00:37 +0900 Subject: [PATCH 138/169] Electriq DES9LW: deprecate separate humidity sensor This is available from the climate entity, and the new Tile cards make it easy to add attributes to the UI. --- .../tuya_local/devices/electriq_desd9lw_dehumidifier.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/tuya_local/devices/electriq_desd9lw_dehumidifier.yaml b/custom_components/tuya_local/devices/electriq_desd9lw_dehumidifier.yaml index bf5666136a..cbc59c45d8 100644 --- a/custom_components/tuya_local/devices/electriq_desd9lw_dehumidifier.yaml +++ b/custom_components/tuya_local/devices/electriq_desd9lw_dehumidifier.yaml @@ -89,6 +89,7 @@ secondary_entities: type: boolean - entity: sensor class: humidity + deprecated: climate.current_humidity dps: - id: 6 type: integer From 2f803685eee6c238c1b93b670f80ba1b169cce08 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 31 Jul 2024 23:32:36 +0900 Subject: [PATCH 139/169] Add support for ElectriQ DESD9LW-V2 dehumidifier Issue #2169 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 2 +- .../electriq_desd9lwv2_dehumidifier.yaml | 84 +++++++++++++++++++ 3 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 custom_components/tuya_local/devices/electriq_desd9lwv2_dehumidifier.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index ac45ad47f3..7f5a46a79d 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -611,3 +611,4 @@ Further device support has been made with the assistance of users. Please consid - [cw-cdz](https://github.com/cw-cdz) for contributing support for Heatstorm HS-1500 heater. - [sveos](https://github.com/sveos) for assisting with support for Nedis ZBRC10WT remote contol. - [RoadkillUK](https://github.com/RoadkillUK) for contributing support for Els Pet Spaceship litter box. +- [dphuk](https://github.com/dphuk) for assisting with ElectriQ DESD8LW V2 dehumidifier. diff --git a/DEVICES.md b/DEVICES.md index 3a74104679..128c3097f8 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -275,7 +275,7 @@ - ElectriQ CD12PWv2 dehumidifier - ElectriQ CD20PRO-LE-V2 dehumidifier - ElectriQ CD25PRO-LE-V2 dehumidifier -- ElectriQ DESD9LW dehumidifier +- ElectriQ DESD9LW dehumidifier (two variants) - Electriq PD45E dehumidifier - Eeese Adam dehumidifier - Eeese Anna dehumidifier diff --git a/custom_components/tuya_local/devices/electriq_desd9lwv2_dehumidifier.yaml b/custom_components/tuya_local/devices/electriq_desd9lwv2_dehumidifier.yaml new file mode 100644 index 0000000000..4f2d9b92df --- /dev/null +++ b/custom_components/tuya_local/devices/electriq_desd9lwv2_dehumidifier.yaml @@ -0,0 +1,84 @@ +name: Dehumidifier +products: + - id: g2hl04s82mgtkpec + name: ElectriQ DESD9LW-V2 +primary_entity: + entity: climate + dps: + - id: 1 + name: hvac_mode + type: boolean + mapping: + - dps_val: false + value: "off" + - dps_val: true + constraint: mode + conditions: + - dps_val: "Auto" + value: "auto" + - dps_val: "Heater" + value: "heat" + - dps_val: "Dehumidity" + value: "dry" + - dps_val: "Fan" + value: "fan_only" + - id: 2 + type: integer + name: humidity + range: + min: 35 + max: 80 + mapping: + - step: 5 + - id: 4 + type: string + name: fan_mode + mapping: + - dps_val: Low + value: low + - dps_val: Medium + value: medium + - dps_val: High + value: high + - dps_val: auto + value: auto + - id: 5 + name: mode + type: string + hidden: true + - id: 6 + type: integer + name: current_humidity + - id: 7 + type: integer + name: current_temperature + - id: 102 + type: string + name: swing_mode + mapping: + - dps_val: "90" + value: "off" + - dps_val: "45" + value: "middle" + - dps_val: "0_90" + value: "vertical" + - id: 101 + type: integer + name: temperature + unit: C + range: + min: 16 + max: 30 +secondary_entities: + - entity: light + translation_key: uv_sterilization + dps: + - id: 15 + name: switch + type: boolean + - entity: switch + translation_key: "ionizer" + dps: + - id: 12 + name: switch + type: boolean From 4fa36890fdc5e81cf8fed2bdebd03fe092d5aab4 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Fri, 2 Aug 2024 22:20:06 +0900 Subject: [PATCH 140/169] Add support for Minoston 6 preset timer switch Issue #2013 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + .../devices/minoston_timer_switch.yaml | 159 ++++++++++++++++++ 3 files changed, 161 insertions(+) create mode 100644 custom_components/tuya_local/devices/minoston_timer_switch.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 7f5a46a79d..277b0762d0 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -612,3 +612,4 @@ Further device support has been made with the assistance of users. Please consid - [sveos](https://github.com/sveos) for assisting with support for Nedis ZBRC10WT remote contol. - [RoadkillUK](https://github.com/RoadkillUK) for contributing support for Els Pet Spaceship litter box. - [dphuk](https://github.com/dphuk) for assisting with ElectriQ DESD8LW V2 dehumidifier. +- [tk627](https://github.com/tk627) for assisting with Minoston 6-preset timer switch. diff --git a/DEVICES.md b/DEVICES.md index 128c3097f8..2f5ea419a0 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -430,6 +430,7 @@ the best option. - Loratap RR400W-V2 relay switch - Makegood double power point (sold under AusElectronicsDirect, Cleverlife, Kogan, Ozsmartthings and other brands) - MakeGood double switch with timers and power monitoring on whole device +- Minoston 6 preset timer switch - Mirabella Genio smartplug with USB - Moes 3-gang switch - Moes 4-gang (quad) switch diff --git a/custom_components/tuya_local/devices/minoston_timer_switch.yaml b/custom_components/tuya_local/devices/minoston_timer_switch.yaml new file mode 100644 index 0000000000..7b84085233 --- /dev/null +++ b/custom_components/tuya_local/devices/minoston_timer_switch.yaml @@ -0,0 +1,159 @@ +name: Timer switch +products: + - id: ae0y7quogjcnzery + name: Minoston nhT06-WIFI +primary_entity: + entity: switch + dps: + - id: 1 + type: boolean + name: switch +secondary_entities: + - entity: number + translation_key: timer + category: config + dps: + - id: 7 + type: integer + name: value + unit: s + range: + min: 0 + max: 86400 + - entity: number + name: Preset 1 time + translation_key: timer + category: config + dps: + - id: 101 + type: integer + name: value + unit: s + range: + min: 0 + max: 86400 + - entity: number + name: Preset 2 time + translation_key: timer + category: config + dps: + - id: 102 + type: integer + name: value + unit: s + range: + min: 0 + max: 86400 + - entity: number + name: Preset 3 time + translation_key: timer + category: config + dps: + - id: 103 + type: integer + name: value + unit: s + range: + min: 0 + max: 86400 + - entity: number + name: Preset 4 time + translation_key: timer + category: config + dps: + - id: 104 + type: integer + name: value + unit: s + range: + min: 0 + max: 86400 + - entity: number + name: Preset 5 time + translation_key: timer + category: config + dps: + - id: 105 + type: integer + name: value + unit: s + range: + min: 0 + max: 86400 + - entity: number + name: Preset 6 time + translation_key: timer + category: config + dps: + - id: 106 + type: integer + name: value + unit: s + range: + min: 0 + max: 86400 + - entity: light + translation_key: indicator + category: config + dps: + - id: 107 + name: brightness + type: integer + range: + min: 0 + max: 100 + - entity: sensor + name: Active timer + class: enum + category: diagnostic + dps: + - id: 108 + type: integer + name: sensor + mapping: + - dps_val: 0 + value: None + - dps_val: 1 + value: Preset 1 + - dps_val: 2 + value: Preset 2 + - dps_val: 3 + value: Preset 3 + - dps_val: 4 + value: Preset 4 + - dps_val: 5 + value: Preset 5 + - dps_val: 6 + value: Preset 6 + - entity: select + name: Power indicator + icon: "mdi:led-on" + category: config + dps: + - id: 109 + type: string + name: option + mapping: + - dps_val: "on" + value: Solid + - dps_val: flicker + value: Blink + - entity: select + name: Timer indicator + icon: "mdi:led-on" + category: config + dps: + - id: 110 + type: string + name: option + mapping: + - dps_val: "on" + value: Solid + - dps_val: flicker + value: Blink + - entity: switch + name: Override + dps: + - id: 111 + type: boolean + name: switch From e880bf31f90bce97ece83a3e895ee481c690ce17 Mon Sep 17 00:00:00 2001 From: Jonathan Peters Date: Fri, 2 Aug 2024 15:38:19 +0200 Subject: [PATCH 141/169] Fix tank sensor for Wood's Cortina Airconditioner --- .../tuya_local/devices/woods_cortina_airconditioner.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/tuya_local/devices/woods_cortina_airconditioner.yaml b/custom_components/tuya_local/devices/woods_cortina_airconditioner.yaml index 589559357b..0bf01b71bc 100644 --- a/custom_components/tuya_local/devices/woods_cortina_airconditioner.yaml +++ b/custom_components/tuya_local/devices/woods_cortina_airconditioner.yaml @@ -66,7 +66,7 @@ secondary_entities: mapping: - dps_val: 0 value: false - - dps_val: 4 + - dps_val: 1 value: false - value: true - entity: binary_sensor @@ -77,7 +77,7 @@ secondary_entities: type: bitfield name: sensor mapping: - - dps_val: 4 + - dps_val: 1 value: true - value: false - entity: switch From c2db4953894b8b2a04bc2cc382413ab57a31bc97 Mon Sep 17 00:00:00 2001 From: MobilettoSoft Date: Thu, 25 Jul 2024 09:24:24 +0200 Subject: [PATCH 142/169] Added support for Wada Energy Q8 EV charger --- .../devices/Wada Energy Q8 Charger.yaml | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml diff --git a/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml b/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml new file mode 100644 index 0000000000..a4fda68fa4 --- /dev/null +++ b/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml @@ -0,0 +1,107 @@ +name: Q8 wall charger +products: + - id: bfa12ec3504d38da17bagc + name: Wada Energy Q8 32kw Wall Charger +primary_entity: + entity: sensor + name: Status + class: enum + icon: "mdi:ev-station" + dps: + - id: 3 + type: string + name: sensor + mapping: + - dps_val: charger_free + value: Available + - dps_val: charger_insert + value: Plugged in + - dps_val: charger_free_fault + value: Fault (unplugged) + - dps_val: charger_wait + value: Waiting + - dps_val: charger_charging + value: Charging + - dps_val: charger_pause + value: Paused + - dps_val: charger_end + value: Finished + - dps_val: charger_fault + value: Fault + - id: 23 + type: string + name: system_version +secondary_entities: + - entity: number + name: Charge current + category: config + class: current + dps: + - id: 4 + type: integer + name: value + unit: A + range: + min: 6 + max: 32 + - entity: sensor + class: power + category: diagnostic + dps: + - id: 9 + type: integer + name: sensor + unit: kW + class: measurement + mapping: + - scale: 1000 + - entity: binary_sensor + class: problem + category: diagnostic + dps: + - id: 10 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - id: 10 + type: bitfield + name: fault_code + - entity: select + name: Mode + icon: "mdi:ev-station" + category: config + dps: + - id: 14 + type: string + name: option + mapping: + - dps_val: charge_now + value: Immediate + - dps_val: charge_pct + value: Charge to percent + - dps_val: charge_energy + value: Fixed charge + - dps_val: charge_schedule + value: Scheduled charge + - dps_val: charge_delay + value: Delayed charge + - entity: switch + icon: "mdi:power" + dps: + - id: 18 + type: boolean + name: switch + - entity: sensor + name: Last charge + category: diagnostic + dps: + - id: 25 + type: integer + name: sensor + unit: kWh + mapping: + - scale: 100 + From f592235f252a4f695fbdfd120b14228f23191680 Mon Sep 17 00:00:00 2001 From: MobilettoSoft Date: Thu, 25 Jul 2024 11:42:23 +0200 Subject: [PATCH 143/169] Update Wada Energy Q8 Charger.yaml removed blank lines --- custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml b/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml index a4fda68fa4..47ead0b269 100644 --- a/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml +++ b/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml @@ -104,4 +104,3 @@ secondary_entities: unit: kWh mapping: - scale: 100 - From d0da260947aa7790f015e10b8ff882eaed8c0dfe Mon Sep 17 00:00:00 2001 From: MobilettoSoft Date: Thu, 25 Jul 2024 11:46:04 +0200 Subject: [PATCH 144/169] Update Wada Energy Q8 Charger.yaml Corrected name --- .../tuya_local/devices/Wada Energy Q8 Charger.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml b/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml index 47ead0b269..f4146daf79 100644 --- a/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml +++ b/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml @@ -1,7 +1,7 @@ name: Q8 wall charger products: - id: bfa12ec3504d38da17bagc - name: Wada Energy Q8 32kw Wall Charger + name: Wada Energy Q8 32A Wall Charger primary_entity: entity: sensor name: Status From af34c63dca0b486c4c84f43546a945e8ba52b170 Mon Sep 17 00:00:00 2001 From: MobilettoSoft Date: Fri, 26 Jul 2024 07:02:21 +0200 Subject: [PATCH 145/169] Update Wada Energy Q8 Charger.yaml corrected product id --- .../tuya_local/devices/Wada Energy Q8 Charger.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml b/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml index f4146daf79..928f62e146 100644 --- a/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml +++ b/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml @@ -1,7 +1,7 @@ name: Q8 wall charger products: - - id: bfa12ec3504d38da17bagc - name: Wada Energy Q8 32A Wall Charger + - id: bktb3jskdic1ar2t + name: Wada Power Q8 32A Wall Charger primary_entity: entity: sensor name: Status From 25bf8e599ed8a462124eed4d60a732da1b013149 Mon Sep 17 00:00:00 2001 From: MobilettoSoft Date: Fri, 26 Jul 2024 15:21:17 +0200 Subject: [PATCH 146/169] Update Wada Energy Q8 Charger.yaml changed name in EV charger --- .../tuya_local/devices/Wada Energy Q8 Charger.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml b/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml index 928f62e146..4d770a2b53 100644 --- a/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml +++ b/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml @@ -1,4 +1,4 @@ -name: Q8 wall charger +name: EV charger products: - id: bktb3jskdic1ar2t name: Wada Power Q8 32A Wall Charger From 8ce2e16662a4bdf1d5c9e16d3fd4d11d28198926 Mon Sep 17 00:00:00 2001 From: MobilettoSoft Date: Fri, 26 Jul 2024 16:21:20 +0200 Subject: [PATCH 147/169] Update and rename Wada Energy Q8 Charger.yaml to Wada Power Q8 Charger.yaml --- .../{Wada Energy Q8 Charger.yaml => Wada Power Q8 Charger.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename custom_components/tuya_local/devices/{Wada Energy Q8 Charger.yaml => Wada Power Q8 Charger.yaml} (100%) diff --git a/custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml b/custom_components/tuya_local/devices/Wada Power Q8 Charger.yaml similarity index 100% rename from custom_components/tuya_local/devices/Wada Energy Q8 Charger.yaml rename to custom_components/tuya_local/devices/Wada Power Q8 Charger.yaml From 13208a8efb66acd0f45b016b493034dd14e83786 Mon Sep 17 00:00:00 2001 From: MobilettoSoft Date: Sun, 28 Jul 2024 09:38:06 +0200 Subject: [PATCH 148/169] Update Wada Power Q8 Charger.yaml Added sensors for scheduled/start stop hour and fault reason --- .../devices/Wada Power Q8 Charger.yaml | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/custom_components/tuya_local/devices/Wada Power Q8 Charger.yaml b/custom_components/tuya_local/devices/Wada Power Q8 Charger.yaml index 4d770a2b53..64f388bd2b 100644 --- a/custom_components/tuya_local/devices/Wada Power Q8 Charger.yaml +++ b/custom_components/tuya_local/devices/Wada Power Q8 Charger.yaml @@ -104,3 +104,65 @@ secondary_entities: unit: kWh mapping: - scale: 100 + - entity: sensor + name: Scheduled start hour + icon: "mdi:battery-clock" + dps: + - id: 19 + type: base64 + name: sensor + optional: true + mapping: + - mask: "FF00" + - entity: sensor + name: Scheduled stop hour + icon: "mdi:battery-clock-outline" + dps: + - id: 19 + type: base64 + name: sensor + optional: true + mapping: + - mask: "00FF" + - entity: sensor + name: Fault reason + icon: 'mdi:alert-outline' + category: diagnostic + class: enum + dps: + - id: 10 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: "Ready" + - dps_val: 1 + value: "Ov2 Cr Fault" + - dps_val: 2 + value: "OV Vol" + - dps_val: 4 + value: "Undervoltage alarm" + - dps_val: 8 + value: "Contactor adhesion" + - dps_val: 16 + value: "Contactor fault" + - dps_val: 32 + value: "Earth fault" + - dps_val: 64 + value: "Meter Hardware alarm" + - dps_val: 128 + value: "Scram fault" + - dps_val: 256 + value: "CP fault" + - dps_val: 512 + value: "Meter Commu fault" + - dps_val: 1024 + value: "Card reader fault" + - dps_val: 2048 + value: "Cir short fault" + - dps_val: 4096 + value: "Adhesion fault" + - dps_val: 8192 + value: "Self test alarm" + - dps_val: 16384 + value: "Leakage current fault" From 2da4452f5f2f5a65880e18649877e0c40647019c Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 3 Aug 2024 23:37:10 +0900 Subject: [PATCH 149/169] Rename Wada Power Q8 Charger.yaml to wadapower_q8_evcharger.yaml Don't use spaces or mixed case in filenames, to avoid cross-platform compatibility issues. PR #2152 --- .../{Wada Power Q8 Charger.yaml => wadapower_q8_evcharger.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename custom_components/tuya_local/devices/{Wada Power Q8 Charger.yaml => wadapower_q8_evcharger.yaml} (100%) diff --git a/custom_components/tuya_local/devices/Wada Power Q8 Charger.yaml b/custom_components/tuya_local/devices/wadapower_q8_evcharger.yaml similarity index 100% rename from custom_components/tuya_local/devices/Wada Power Q8 Charger.yaml rename to custom_components/tuya_local/devices/wadapower_q8_evcharger.yaml From 915bce1950021085532f26cdcfacf94a0fddcf65 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 4 Aug 2024 00:44:01 +0900 Subject: [PATCH 150/169] Fisher summer: add compatible Tesla model - group some extra attributes with their related entities. - add some additional attributes from Tesla info. It seems some additional functions are available in the "options" attribute (boolCode in tuya docs), however making it accessible also involves parsing the available features, making this too complex to implement. Issue #2014 --- .../fisher_summer_air_conditioner.yaml | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/custom_components/tuya_local/devices/fisher_summer_air_conditioner.yaml b/custom_components/tuya_local/devices/fisher_summer_air_conditioner.yaml index 42c99c48ff..a3be70e6f6 100644 --- a/custom_components/tuya_local/devices/fisher_summer_air_conditioner.yaml +++ b/custom_components/tuya_local/devices/fisher_summer_air_conditioner.yaml @@ -4,6 +4,8 @@ products: name: Fisher Summer - id: u9jjsaluqe1trtxv name: Daitsu DS-9KTP + - id: fcnlevuwfd1jgkvx + name: Tesla TT34TP21-1232IAWUV primary_entity: entity: climate translation_only_key: aircon_extra @@ -67,9 +69,6 @@ primary_entity: name: current_humidity type: integer optional: true - - id: 20 - name: fault_code - type: bitfield - id: 110 name: functions_available type: bitfield @@ -99,14 +98,6 @@ primary_entity: # 21. temperature scale switching, 1 is Fahrenheit, 0 is Celsius # 22. soft wind # 23. left and right wide-angle air supply - - id: 115 - type: integer - name: total_n - optional: true - - id: 116 - type: integer - name: total_p - optional: true - id: 123 name: options type: string @@ -147,6 +138,13 @@ secondary_entities: - dps_val: 0 value: false - value: true + - id: 20 + name: fault_code + type: bitfield + - id: 122 + name: fault2 + type: bitfield + optional: true - entity: sensor # no sensor in Fisher Summer AC, returns 0 class: pm25 dps: @@ -324,6 +322,14 @@ secondary_entities: - dps_val: 5 value: 5 kWh optional: true + - id: 115 + type: integer + name: total_n + optional: true + - id: 116 + type: integer + name: total_p + optional: true - entity: number name: Power Saving Temperature category: config From 755d7853b22f5b1c6fa8c7731ccefcdb4f4156d2 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 4 Aug 2024 00:47:55 +0900 Subject: [PATCH 151/169] Docs for PR #2152 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + 2 files changed, 2 insertions(+) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 277b0762d0..df22d0ee24 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -613,3 +613,4 @@ Further device support has been made with the assistance of users. Please consid - [RoadkillUK](https://github.com/RoadkillUK) for contributing support for Els Pet Spaceship litter box. - [dphuk](https://github.com/dphuk) for assisting with ElectriQ DESD8LW V2 dehumidifier. - [tk627](https://github.com/tk627) for assisting with Minoston 6-preset timer switch. +- [MobilettoSoft](https://github.com/MobilettoSoft) for contributing support for Wada Power Q8 EV charger. diff --git a/DEVICES.md b/DEVICES.md index 2f5ea419a0..082ad05538 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -387,6 +387,7 @@ - Parkside PLGS 2012 A1 smart charger for powertools - Tera W01 EV charger - Vivor portable EV charger +- Wada Power Q8 EV charger - WOUEJ 22kW EV charger ### SmartPlugs/Wall sockets/Wall switches/Inline switches From 8f9c47ecb26bf69222202b134c34b9b41efbd2de Mon Sep 17 00:00:00 2001 From: Josias Montag Date: Sun, 4 Aug 2024 11:46:19 +0200 Subject: [PATCH 152/169] Add RainPoint Smart Water Timer --- .../devices/rainpoint_water_timer.yaml | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 custom_components/tuya_local/devices/rainpoint_water_timer.yaml diff --git a/custom_components/tuya_local/devices/rainpoint_water_timer.yaml b/custom_components/tuya_local/devices/rainpoint_water_timer.yaml new file mode 100644 index 0000000000..aabb4bfafb --- /dev/null +++ b/custom_components/tuya_local/devices/rainpoint_water_timer.yaml @@ -0,0 +1,116 @@ +name: RainPoint Smart Water Timer +products: + - id: ew946yrp3pgbaziu + name: RainPoint TTV103FRF +primary_entity: + entity: valve + class: water + icon: "mdi:watering-can" + dps: + - id: 108 + type: boolean + name: valve + mapping: + - dps_val: true + value: false + - dps_val: false + value: true +secondary_entities: + - entity: switch + name: Weekly Automatic Irrigation + category: config + icon: "mdi:calendar-clock" + dps: + - id: 125 + optional: true + type: boolean + name: switch + mapping: + - dps_val: true + value: false + - dps_val: false + value: true + - entity: select + name: Weekly Irrigation Rain Delay + category: config + icon: "mdi:timer-sand" + dps: + - id: 113 + optional: true + type: string + name: option + mapping: + - dps_val: "0" + value: "0h" + - dps_val: "24" + value: "24h" + - dps_val: "48" + value: "48h" + - dps_val: "72" + value: "72h" + - entity: sensor + class: battery + category: diagnostic + dps: + - id: 105 + type: string + name: sensor + unit: "%" + mapping: + - dps_val: "0" + value: 10 + - dps_val: "1" + value: 50 + - dps_val: "2" + value: 100 + - entity: sensor + name: Water flow + class: water + category: diagnostic + icon: "mdi:water" + dps: + - id: 103 + name: sensor + type: integer + unit: L + - entity: number + translation_key: timer + category: config + dps: + - id: 107 + type: integer + name: value + unit: min + range: + min: 0 + max: 60 + - entity: sensor + name: Status + class: enum + icon: "mdi:list-status" + category: diagnostic + dps: + - id: 106 + type: string + name: sensor + mapping: + - dps_val: "0" + value: "Off" + - dps_val: "1" + value: "Manual" + - dps_val: "2" + value: "Auto" + - dps_val: "3" + value: "Rain Delay" + - entity: binary_sensor + category: diagnostic + class: problem + icon: "mdi:alert" + dps: + - id: 120 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true From fe3e4de225a13a40fc5421ee86f9397e50f2a965 Mon Sep 17 00:00:00 2001 From: Josias Montag Date: Tue, 6 Aug 2024 14:07:47 +0200 Subject: [PATCH 153/169] Update names to follow HA naming convention --- .../tuya_local/devices/rainpoint_water_timer.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/custom_components/tuya_local/devices/rainpoint_water_timer.yaml b/custom_components/tuya_local/devices/rainpoint_water_timer.yaml index aabb4bfafb..2c1eca7f5a 100644 --- a/custom_components/tuya_local/devices/rainpoint_water_timer.yaml +++ b/custom_components/tuya_local/devices/rainpoint_water_timer.yaml @@ -1,4 +1,4 @@ -name: RainPoint Smart Water Timer +name: Water timer products: - id: ew946yrp3pgbaziu name: RainPoint TTV103FRF @@ -17,7 +17,7 @@ primary_entity: value: true secondary_entities: - entity: switch - name: Weekly Automatic Irrigation + name: Automatic irrigation category: config icon: "mdi:calendar-clock" dps: @@ -31,7 +31,7 @@ secondary_entities: - dps_val: false value: true - entity: select - name: Weekly Irrigation Rain Delay + name: Rain delay category: config icon: "mdi:timer-sand" dps: @@ -105,7 +105,6 @@ secondary_entities: - entity: binary_sensor category: diagnostic class: problem - icon: "mdi:alert" dps: - id: 120 type: bitfield From 266804d367309a53b48ec94091ef0ff9a4799742 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 6 Aug 2024 21:43:44 +0900 Subject: [PATCH 154/169] Docs for PR #2180 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + 2 files changed, 2 insertions(+) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index df22d0ee24..c09f477af3 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -614,3 +614,4 @@ Further device support has been made with the assistance of users. Please consid - [dphuk](https://github.com/dphuk) for assisting with ElectriQ DESD8LW V2 dehumidifier. - [tk627](https://github.com/tk627) for assisting with Minoston 6-preset timer switch. - [MobilettoSoft](https://github.com/MobilettoSoft) for contributing support for Wada Power Q8 EV charger. +- [josiasmontag](https://github.com/josiasmontag) for contributing support for RainPoint water timer. diff --git a/DEVICES.md b/DEVICES.md index 082ad05538..3d87562717 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -730,6 +730,7 @@ port and password. - PlantsIO Ivy smart planter - PV28-CW 8 in 1 air quality monitor - RTCZ-03 human presence sensor +- RainPoint TTV103FRF water timer - SD123 HPR01 human presence radar - SNT957W-TDE temperature sensor - SNT957W-DE CBU temperature and humidity sensor From 8a45d64a7f757e7f8d3f392c954f2150848cfca4 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 6 Aug 2024 21:59:31 +0900 Subject: [PATCH 155/169] Add support for Tesla Smart pet feeder Issue #2044 --- ACKNOWLEDGEMENTS.md | 12 +++--- DEVICES.md | 3 +- .../tuya_local/devices/tesla_pet_feeder.yaml | 37 +++++++++++++++++++ 3 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 custom_components/tuya_local/devices/tesla_pet_feeder.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index c09f477af3..63b509dd22 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -82,7 +82,7 @@ Further device support has been made with the assistance of users. Please consid - [markbvdh](https://github.com/markbvdh) for assistance with Kogan garage openers and confirmation of Summerwave Si pool heatpumps. - [tavicu](https://github.com/tavicu) for contributing support for Starlight Heatpumps, Simple Blinds and for the idea to support inverted values, and thanks for the coffee! - [Chris061290](https://github.com/Chris061290) for contributing support for IPS Pro pool heatpumps, complete with unit tests. -- [MartinCarbol](https://github.com/MartinCarbol) for contributing support for two models of Tesla Air Purifier. +- [MartinCarbol](https://github.com/MartinCarbol) for contributing support for two models of Tesla Smart Air Purifier. - [gschmidl](https://github.com/gschmidl) for assistance with Himox H05 purifier. - [daitj](https://github.com/daitj) for contributing support for Wilfa Haze humidifier. - [Utopia69](https://github.com/Utopia69) for providing additional info on his Fairland IPH45 heatpump (matching Madimack) @@ -462,7 +462,7 @@ Further device support has been made with the assistance of users. Please consid - [wholly1971](https://github.com/wholly1971) for assisting with support for Madimack Eco pool heatpumps. - [rbrtwillis](https://github.com/rbrtwillis) for assisting with support for Inkbird IHC-200 humidity controllers. - [vojeroen](https://github.com/vojeroen) for contributing support for CleanAir 605B humidifiers. -- [fantnhu](https://github.com/fantnhu) for assisting with support for Tesla aroma diffusers, PNI water feeders and door peephole cameras. +- [fantnhu](https://github.com/fantnhu) for assisting with support for Tesla Smart aroma diffusers, PNI water feeders and door peephole cameras. - [sudo-nitz](https://github.com/sudo-nitz) for assisting with support for Yagusmart 3PN 63A energy meter. - [jedubois](https://github.com/jedubois) for assisting with support for Taurus Agadir oil column heaters. - [debdalerichard](https://github.com/debdalerichard) for assisting with support for Weekett kettles. @@ -481,7 +481,7 @@ Further device support has been made with the assistance of users. Please consid - [TwoWheelPro](https://github.com/TwoWheelPro) for contributing support for Holman WX8 irrigation controllers. - [scrampker](https://github.com/scrampker) for assisting with support for Ironzon fingerprint locks. - [sergeymatsay](https://github.com/sergeymatsay) for assisting with support for Avatto ME81 thermostats. -- [hrenki](https://github.com/hrenki) for assisting with support for Tesla TAF series air conditioners. +- [hrenki](https://github.com/hrenki) for assisting with support for Tesla Smart TAF series air conditioners. - [FSJHecker](https://github.com/FSJHecker) for contributing support for CleanAir 604B humidifiers. - [sambarlick](https://github.com/sambarlick) for contributing support for Kogan bladeless fans and Y12 and Y16 air conditioners. - [AproveIPD](https://github.com/AproveIPD) for assisting with support for Tonepie T1PRO cat litter boxes. @@ -562,7 +562,7 @@ Further device support has been made with the assistance of users. Please consid - [rostKo](https://github.com/rostKo) for contributing improvements to WDYK energy monitors. - [Aegeontis](https://github.com/Aegeontis) for contributing Puppy Kitty compatibility for Catit Pixi smart feeder. - [chris-garbas](https://github.com/chris-garbas) for contributing improvements to IPS pro heatpump. -- [Nyotee](https://github.com/Nyotee) for assisting with support for Tesla AUX series air conditioner. +- [Nyotee](https://github.com/Nyotee) for assisting with support for Tesla Smart AUX series air conditioner. - [psuet](https://github.com/psuet) for assisting with support for XCase lock boxes. - [Zylazy](https://github.com/Zylazy) for assisting with support for Hoenyzy valve timers. - [Zelaf](https://github.com/Zelaf) for contributing improvements to Nedis portable air conditioner. @@ -573,7 +573,7 @@ Further device support has been made with the assistance of users. Please consid - [malosaa](https://github.com/malosaa) for contributing support for LSC RGB-CCT lightbulbs and Fresco Hydrate Ultra pet fountains. - [liouma](https://github.com/liouma) for assisting with support for Kolanky EV chargers. - [gy6221](https://github.com/gy6221) for contributing improvements to Atorch SW1P switches. -- [opolczer](https://github.com/opolczer) for assisting with support for KY 35W-10 shutter controllers and Fisher air to water heat pump. +- [opolczer](https://github.com/opolczer) for assisting with support for KY 35W-10 shutter controllers, Fisher air to water heat pump and Tesla Smart pet feeder. - [jannisan](https://github.com/jannisan) for contributing support for Divoo DWV010 dual water timers. - [pergolafabio](https://github.com/pergolafabio) for contributing support for V330 pet feeders. - [contactnat](https://github.com/contactnat) for assistance with Goldair PH-ET07EA heaters. @@ -591,7 +591,7 @@ Further device support has been made with the assistance of users. Please consid - [Nuwisam](https://github.com/Nuwisam) for contributing doc fixes. - [jorgeal94](https://github.com/jorgeal94) for assisting with support for another Tongou QCB2 circuit breaker variant and compatible Tongou SMR1 circuit breaker. - [ifumadjiev](https://github.com/ifumadjiev) for assisting with support for Gosund SP112 USB smartplug. -- [Trychlik](https://github.com/Trychlik) for assisting with support for Tesla S300 air purifier. +- [Trychlik](https://github.com/Trychlik) for assisting with support for Tesla Smart S300 air purifier. - [thewade](https://github.com/thewade) for contributing support for PlantsIO Ivy smart planter. - [bjeanes](https://github.com/bjeanes) for contributing support for Bonaire HPC5200020 heater. - [jianyun8023](https://github.com/jianyun8023) for contributing Chinese (Simplified) translations, and support for Casdon TD Pro oven. diff --git a/DEVICES.md b/DEVICES.md index 3d87562717..f6e3faa06e 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -256,7 +256,7 @@ - Soho SO-350WUI Air Purifier - Soleusair A02 and A10 air purifiers - Stadler Form Roger air purifier -- Tesla S300, Smart Pro and Mini air purifiers +- Tesla Smart S300, Pro and Mini air purifiers - Vork VK6067AW air purifier ### Dehumidifiers @@ -675,6 +675,7 @@ port and password. - Petoneer Fresco Hydrate Ultra pet fountain/ - PNI water feeder - Rojeco PTM-001 pet feeder (two versions) +- Tesla Smart pet feeder - Tonepie T1PRO automatic cat litter box - V330L pet feeder - WellToBe Automatic Pet Feeder (WB S36D) diff --git a/custom_components/tuya_local/devices/tesla_pet_feeder.yaml b/custom_components/tuya_local/devices/tesla_pet_feeder.yaml new file mode 100644 index 0000000000..16f77f062b --- /dev/null +++ b/custom_components/tuya_local/devices/tesla_pet_feeder.yaml @@ -0,0 +1,37 @@ +name: Pet feeder +products: + - id: 8gdwxpoqdxdzefpe + name: Tesla Smart TSL-PC-BL4 +primary_entity: + entity: switch + dps: + - id: 1 + type: boolean + name: switch +secondary_entities: + - entity: number + name: Serving size + category: config + icon: "mdi:dots-hexagon" + dps: + - id: 101 + type: integer + name: value + unit: portions + range: + min: 1 + max: 10 + - entity: binary_sensor + class: problem + category: diagnostic + dps: + - id: 102 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - id: 102 + type: bitfield + name: fault_code From 26b2038271486b6d1cda7b226c965584ce0ded35 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 7 Aug 2024 21:44:20 +0900 Subject: [PATCH 156/169] Add support for Moes zigbee dual dimmer module Issue #2039 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + .../tuya_local/devices/moes_dual_dimmer.yaml | 160 ++++++++++++++++++ 3 files changed, 162 insertions(+) create mode 100644 custom_components/tuya_local/devices/moes_dual_dimmer.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 63b509dd22..2a8ac87078 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -615,3 +615,4 @@ Further device support has been made with the assistance of users. Please consid - [tk627](https://github.com/tk627) for assisting with Minoston 6-preset timer switch. - [MobilettoSoft](https://github.com/MobilettoSoft) for contributing support for Wada Power Q8 EV charger. - [josiasmontag](https://github.com/josiasmontag) for contributing support for RainPoint water timer. +- [DefinitelyADev](https://github.com/DefinitelyADev) for contributing support for Moes zigbee dual dimmer module. diff --git a/DEVICES.md b/DEVICES.md index f6e3faa06e..d2b692ec84 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -797,6 +797,7 @@ entity types as sub devices. - LoraTap SC500ZB-V2 curtain controller - Loratap SS9600ZB 6 button remote control - Moes BRT-100-TRV radiator valve +- Moes dual dimmer module - Moes RGBCW lightbulb - Moes ZHT-002 thermostat - MultiIR MIR-TE100-TY temperature and humidity sensor diff --git a/custom_components/tuya_local/devices/moes_dual_dimmer.yaml b/custom_components/tuya_local/devices/moes_dual_dimmer.yaml new file mode 100644 index 0000000000..2a0bc49856 --- /dev/null +++ b/custom_components/tuya_local/devices/moes_dual_dimmer.yaml @@ -0,0 +1,160 @@ +name: Dual dimmer +products: + - id: bxoo2swd + name: Moes ZM-105B-M-MS +primary_entity: + entity: light + name: Light 1 + dps: + - id: 1 + type: boolean + name: switch + - id: 2 + name: brightness + type: integer + range: + min: 10 + max: 1000 +secondary_entities: + - entity: light + name: Light 2 + dps: + - id: 7 + type: boolean + name: switch + - id: 8 + name: brightness + type: integer + range: + min: 10 + max: 1000 + - entity: number + name: Minimum brightness 1 + category: config + icon: "mdi:lightbulb-on-30" + dps: + - id: 3 + type: integer + name: value + optional: true + range: + min: 10 + max: 1000 + - entity: number + name: Maximum brightness 1 + category: config + icon: "mdi:lightbulb-on-90" + dps: + - id: 5 + type: integer + name: value + optional: true + range: + min: 10 + max: 1000 + - entity: number + name: Minimum brightness 2 + category: config + icon: "mdi:lightbulb-on-30" + dps: + - id: 9 + type: integer + name: value + optional: true + range: + min: 10 + max: 1000 + - entity: number + name: Maximum brightness 2 + category: config + icon: "mdi:lightbulb-on-90" + dps: + - id: 11 + type: integer + name: value + optional: true + range: + min: 10 + max: 1000 + - entity: select + name: Light type 1 + category: config + dps: + - id: 4 + type: string + name: option + icon: "mdi:lightbulb-alert" + mapping: + - dps_val: led + value: LED + icon: "mdi:lightbulbon-50" + - dps_val: incandescent + value: Incandescent + icon: "mdi:lightbulb-variant-outline" + - dps_val: halogen + value: Halogen + icon: "mdi:lightbulb-spot" + - entity: select + name: Light type 2 + category: config + dps: + - id: 10 + type: string + name: option + icon: "mdi:lightbulb-alert" + mapping: + - dps_val: led + value: LED + icon: "mdi:lightbulbon-50" + - dps_val: incandescent + value: Incandescent + icon: "mdi:lightbulb-variant-outline" + - dps_val: halogen + value: Halogen + icon: "mdi:lightbulb-spot" + - entity: number + translation_key: timer + name: Timer 1 + category: config + dps: + - id: 6 + type: integer + name: value + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + step: 60 + - entity: number + translation_key: timer + name: Timer 2 + category: config + dps: + - id: 12 + type: integer + name: value + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + step: 60 + - entity: select + name: Initial state + icon: "mdi:toggle-switch" + category: config + dps: + - id: 14 + type: string + name: option + optional: true + mapping: + - dps_val: "off" + value: "Off" + - dps_val: "on" + value: "On" + - dps_val: memory + value: Last state From 538d08db74231219c5294e3b4f142dd3834cc02d Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 7 Aug 2024 21:57:02 +0900 Subject: [PATCH 157/169] Moes dual dimmer: fix icon config --- custom_components/tuya_local/devices/moes_dual_dimmer.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/tuya_local/devices/moes_dual_dimmer.yaml b/custom_components/tuya_local/devices/moes_dual_dimmer.yaml index 2a0bc49856..2c8875ff0c 100644 --- a/custom_components/tuya_local/devices/moes_dual_dimmer.yaml +++ b/custom_components/tuya_local/devices/moes_dual_dimmer.yaml @@ -79,11 +79,11 @@ secondary_entities: - entity: select name: Light type 1 category: config + icon: "mdi:lightbulb-alert" dps: - id: 4 type: string name: option - icon: "mdi:lightbulb-alert" mapping: - dps_val: led value: LED @@ -97,11 +97,11 @@ secondary_entities: - entity: select name: Light type 2 category: config + icon: "mdi:lightbulb-alert" dps: - id: 10 type: string name: option - icon: "mdi:lightbulb-alert" mapping: - dps_val: led value: LED From 79ffa29e8a4c7240dc0e7dd5e97ab9a42c893c3e Mon Sep 17 00:00:00 2001 From: Aaron Daubman Date: Wed, 31 Jul 2024 22:30:59 -0400 Subject: [PATCH 158/169] add device yaml for vevor l2 48A charger --- .../devices/vevor_l2_ev_charger.yaml | 223 ++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 custom_components/tuya_local/devices/vevor_l2_ev_charger.yaml diff --git a/custom_components/tuya_local/devices/vevor_l2_ev_charger.yaml b/custom_components/tuya_local/devices/vevor_l2_ev_charger.yaml new file mode 100644 index 0000000000..1c454cdd24 --- /dev/null +++ b/custom_components/tuya_local/devices/vevor_l2_ev_charger.yaml @@ -0,0 +1,223 @@ +name: L2 EV charger +products: + - id: onb9rrxfl9ywgzrg + name: VEVOR L2 48A EV Charger +primary_entity: + entity: sensor + name: Status + class: enum + icon: "mdi:ev-station" + dps: + - id: 3 + type: string + name: sensor + mapping: + - dps_val: charger_free + value: Available + - dps_val: charger_insert + value: Plugged in + - dps_val: charger_free_fault + value: Fault (unplugged) + - dps_val: charger_wait + value: Waiting + - dps_val: charger_charging + value: Charging + - dps_val: charger_pause + value: Paused + - dps_val: charger_end + value: Finished + - dps_val: charger_fault + value: Fault + - id: 23 + type: string + name: system_version + - id: 33 + type: string + optional: true + name: mode_set +secondary_entities: + - entity: sensor + class: energy + dps: + - id: 1 + type: integer + name: sensor + unit: kWh + class: total_increasing + mapping: + - scale: 100 + - entity: number + name: Charge current + category: config + class: current + dps: + - id: 4 + type: integer + name: value + unit: A + range: + min: 8 + max: 48 + - entity: sensor + name: Single phase power + class: power + category: diagnostic + dps: + - id: 6 + type: base64 + name: sensor + optional: true + unit: kW + mapping: + - scale: 1000 + mask: "0000000000FFFFFF" + - entity: sensor + class: voltage + category: diagnostic + dps: + - id: 6 + type: base64 + name: sensor + optional: true + unit: V + mapping: + - scale: 10 + mask: "FFFF000000000000" + - entity: sensor + class: current + category: diagnostic + dps: + - id: 6 + type: base64 + name: sensor + optional: true + unit: A + mapping: + - scale: 1000 + mask: "0000FFFFFF000000" + - entity: sensor + class: power + category: diagnostic + dps: + - id: 9 + type: integer + name: sensor + unit: kW + class: measurement + mapping: + - scale: 1000 + - entity: binary_sensor + class: problem + category: diagnostic + dps: + - id: 10 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - id: 10 + type: bitfield + name: fault_code + - entity: sensor + name: Connection state + class: enum + icon: "mdi:ev-plug-type2" + category: diagnostic + dps: + - id: 13 + type: string + name: sensor + mapping: + - dps_val: controlpi_12v + value: Standby + - dps_val: controlpi_12v_pwn + value: Communication initialising + - dps_val: controlpi_9v + value: Vehicle detected + - dps_val: controlpi_9v_pwm + value: Vehicle connected + - dps_val: controlpi_6v + value: Ready to charge + - dps_val: controlpi_6v_pwm + value: Charging + - dps_val: controlpi_error + value: Error + - entity: select + name: Mode + icon: "mdi:ev-station" + category: config + dps: + - id: 14 + type: string + name: option + mapping: + - dps_val: charge_now + value: Immediate + - dps_val: charge_pct + value: Charge to percent + - dps_val: charge_energy + value: Fixed charge + - dps_val: charge_schedule + value: Scheduled charge + - dps_val: charge_delay + value: Delayed charge + - entity: button + name: Clear energy + class: restart + category: config + dps: + - id: 16 + type: boolean + name: button + - entity: switch + icon: "mdi:power" + dps: + - id: 18 + type: boolean + name: switch + - entity: sensor + class: temperature + category: diagnostic + dps: + - id: 24 + type: integer + name: sensor + unit: C + class: measurement + - entity: sensor + name: Last charge + category: diagnostic + dps: + - id: 25 + type: integer + name: sensor + unit: kWh + mapping: + - scale: 100 + - entity: binary_sensor + class: connectivity + category: diagnostic + dps: + - id: 27 + type: string + name: sensor + optional: true + mapping: + - dps_val: online + value: true + - dps_val: offline + value: false + - entity: number + name: Delay time + category: config + icon: "mdi:clock" + dps: + - id: 28 + type: integer + name: value + unit: h + range: + min: 0 + max: 12 From f7eefa02b6b3b8ebb24b45693a5eb46cf511a30d Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 7 Aug 2024 22:35:24 +0900 Subject: [PATCH 159/169] Vevor L2 EV charger: naming changes, merge power into one - as per review comment, the two power sensors are the same due to being a single phase device (even if connected between 2 phases of a US power supply). Merge them into a single sensor, with the separate reading as a "total_power" attribute. - Remove product name from top level name, remove generic product category from product specific name. PR #2172 --- .../devices/vevor_l2_ev_charger.yaml | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/custom_components/tuya_local/devices/vevor_l2_ev_charger.yaml b/custom_components/tuya_local/devices/vevor_l2_ev_charger.yaml index 1c454cdd24..31b73dec8d 100644 --- a/custom_components/tuya_local/devices/vevor_l2_ev_charger.yaml +++ b/custom_components/tuya_local/devices/vevor_l2_ev_charger.yaml @@ -1,7 +1,7 @@ -name: L2 EV charger +name: EV charger products: - id: onb9rrxfl9ywgzrg - name: VEVOR L2 48A EV Charger + name: VEVOR L2 48A primary_entity: entity: sensor name: Status @@ -59,7 +59,6 @@ secondary_entities: min: 8 max: 48 - entity: sensor - name: Single phase power class: power category: diagnostic dps: @@ -71,6 +70,11 @@ secondary_entities: mapping: - scale: 1000 mask: "0000000000FFFFFF" + - id: 9 + type: integer + name: total_power + mapping: + - scale: 1000 - entity: sensor class: voltage category: diagnostic @@ -95,17 +99,6 @@ secondary_entities: mapping: - scale: 1000 mask: "0000FFFFFF000000" - - entity: sensor - class: power - category: diagnostic - dps: - - id: 9 - type: integer - name: sensor - unit: kW - class: measurement - mapping: - - scale: 1000 - entity: binary_sensor class: problem category: diagnostic From 184cb2bf485179eb3b6b1bfbe70ed537d0d7246f Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 7 Aug 2024 22:49:08 +0900 Subject: [PATCH 160/169] Docs for PR #2172 --- ACKNOWLEDGEMENTS.md | 3 ++- DEVICES.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 2a8ac87078..c7affb90d9 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -615,4 +615,5 @@ Further device support has been made with the assistance of users. Please consid - [tk627](https://github.com/tk627) for assisting with Minoston 6-preset timer switch. - [MobilettoSoft](https://github.com/MobilettoSoft) for contributing support for Wada Power Q8 EV charger. - [josiasmontag](https://github.com/josiasmontag) for contributing support for RainPoint water timer. -- [DefinitelyADev](https://github.com/DefinitelyADev) for contributing support for Moes zigbee dual dimmer module. +- [DefinitelyADev](https://github.com/DefinitelyADev) for assisting with support for Moes zigbee dual dimmer module. +- [daubman](https://github.com/daubman) for contributing support for Vevor Level 2 EV charger. diff --git a/DEVICES.md b/DEVICES.md index d2b692ec84..58d4cc3dda 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -386,6 +386,7 @@ - Kolanky 3.6kW EV charger - Parkside PLGS 2012 A1 smart charger for powertools - Tera W01 EV charger +- Vevor Level 2 EV charger - Vivor portable EV charger - Wada Power Q8 EV charger - WOUEJ 22kW EV charger From 82e386368f13bbf77f84108b19c18f5d9d47affb Mon Sep 17 00:00:00 2001 From: Blcktape Date: Tue, 6 Aug 2024 16:48:04 +0200 Subject: [PATCH 161/169] Create ion_wifi_dimmer.yaml --- .../tuya_local/devices/ion_wifi_dimmer.yaml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 custom_components/tuya_local/devices/ion_wifi_dimmer.yaml diff --git a/custom_components/tuya_local/devices/ion_wifi_dimmer.yaml b/custom_components/tuya_local/devices/ion_wifi_dimmer.yaml new file mode 100644 index 0000000000..50885db263 --- /dev/null +++ b/custom_components/tuya_local/devices/ion_wifi_dimmer.yaml @@ -0,0 +1,58 @@ +name: ION WIFI DIMMER +products: + - id: ceikasvm5p5ymcax + name: ION WIFI DIMMER +primary_entity: + entity: light + dps: + - id: 1 + name: switch + type: boolean + - id: 2 + name: brightness + type: integer + range: + min: 10 + max: 1000 +secondary_entities: + - entity: number + name: Minimum brightness + category: config + icon: "mdi:brightness-percent" + dps: + - id: 3 + type: integer + name: value + range: + min: 10 + max: 1000 + mapping: + - step: 1 + - entity: number + name: Maximum brightness + category: config + icon: "mdi:brightness-percent" + dps: + - id: 5 + type: integer + name: value + range: + min: 10 + max: 1000 + mapping: + - step: 1 + - entity: number + translation_key: timer + name: Timer + category: config + dps: + - id: 6 + type: integer + name: value + unit: "s" + range: + min: 0 + max: 86400 + mapping: + - scale: 0 + - step: 1 From 3a902008413db7ed19353d70d8976a43b8e54605 Mon Sep 17 00:00:00 2001 From: Blcktape Date: Wed, 7 Aug 2024 16:30:00 +0200 Subject: [PATCH 162/169] Update ion_wifi_dimmer.yaml --- .../tuya_local/devices/ion_wifi_dimmer.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/custom_components/tuya_local/devices/ion_wifi_dimmer.yaml b/custom_components/tuya_local/devices/ion_wifi_dimmer.yaml index 50885db263..492a09acf7 100644 --- a/custom_components/tuya_local/devices/ion_wifi_dimmer.yaml +++ b/custom_components/tuya_local/devices/ion_wifi_dimmer.yaml @@ -1,4 +1,4 @@ -name: ION WIFI DIMMER +name: Dimmer products: - id: ceikasvm5p5ymcax name: ION WIFI DIMMER @@ -26,8 +26,6 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - step: 1 - entity: number name: Maximum brightness category: config @@ -39,8 +37,6 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - step: 1 - entity: number translation_key: timer name: Timer @@ -49,10 +45,10 @@ secondary_entities: - id: 6 type: integer name: value - unit: "s" + unit: min range: min: 0 max: 86400 mapping: - - scale: 0 - - step: 1 + - scale: 60 + - step: 60 From 1d7fcae364ac1894968dee1666ded541e640e7a6 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 8 Aug 2024 20:53:18 +0900 Subject: [PATCH 163/169] Ion dimmer: final changes before merge - use mixed case and more product specific details for product name - remove explicit name from timer, as translation_key should cover it - merge scale and step for timer into a single default mapping --- custom_components/tuya_local/devices/ion_wifi_dimmer.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/custom_components/tuya_local/devices/ion_wifi_dimmer.yaml b/custom_components/tuya_local/devices/ion_wifi_dimmer.yaml index 492a09acf7..2ce00f8825 100644 --- a/custom_components/tuya_local/devices/ion_wifi_dimmer.yaml +++ b/custom_components/tuya_local/devices/ion_wifi_dimmer.yaml @@ -1,7 +1,7 @@ name: Dimmer products: - id: ceikasvm5p5ymcax - name: ION WIFI DIMMER + name: Ion LED WiFi 200W NF primary_entity: entity: light dps: @@ -39,7 +39,6 @@ secondary_entities: max: 1000 - entity: number translation_key: timer - name: Timer category: config dps: - id: 6 @@ -51,4 +50,4 @@ secondary_entities: max: 86400 mapping: - scale: 60 - - step: 60 + step: 60 From 4f42c0831c0955ddd9c63a9d0d86a4bf6468195b Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 8 Aug 2024 21:51:01 +0900 Subject: [PATCH 164/169] Docs for PR #2184 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + 2 files changed, 2 insertions(+) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index c7affb90d9..b6a6c0022b 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -617,3 +617,4 @@ Further device support has been made with the assistance of users. Please consid - [josiasmontag](https://github.com/josiasmontag) for contributing support for RainPoint water timer. - [DefinitelyADev](https://github.com/DefinitelyADev) for assisting with support for Moes zigbee dual dimmer module. - [daubman](https://github.com/daubman) for contributing support for Vevor Level 2 EV charger. +- [Blcktape](https://github.com/Blcktape) for contributing support for Ion LED WiFi dimmer. diff --git a/DEVICES.md b/DEVICES.md index 58d4cc3dda..32c26b5fbc 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -514,6 +514,7 @@ of device. - Galaxy Projector - HDMI sync light - iHD001 LED controller +- Ion LED WiFi dimmer - Kojima motion sensor RGBCW nightlight - Lexi Lighting string light Wifi adapter - LightStar CCT track light From 7251b3ae24934801dbb8b735ef5bf3115b3eaaf3 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 8 Aug 2024 22:40:36 +0900 Subject: [PATCH 165/169] lock: Support open action and is_opened property. Issue #1931 Available in HA 2024.5 and later --- custom_components/tuya_local/devices/README.md | 3 ++- custom_components/tuya_local/lock.py | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/custom_components/tuya_local/devices/README.md b/custom_components/tuya_local/devices/README.md index 7efd8cd722..7fa9b3d7b0 100644 --- a/custom_components/tuya_local/devices/README.md +++ b/custom_components/tuya_local/devices/README.md @@ -646,7 +646,8 @@ Humidifer can also cover dehumidifiers (use class to specify which). The unlock... dps below are normally integers, but can also be boolean, in which case no information will be available about which specific credential was used to unlock the lock. -- **lock** (optional, boolean): a dp to control the lock state: true = locked, false = unlocked +- **lock** (optional, boolean): a dp to control the lock state: true = locked, false = unlocked. +- **open** (optional, boolean): a dp to open or close the door or gate controlled by the lock, or if marked readonly to report the open status. - **unlock_fingerprint** (optional, integer): a dp to identify the fingerprint used to unlock the lock. - **unlock_password** (optional, integer): a dp to identify the password used to unlock the lock. - **unlock_temp_pwd** (optional, integer): a dp to identify the temporary password used to unlock the lock. diff --git a/custom_components/tuya_local/lock.py b/custom_components/tuya_local/lock.py index 1e4905f3a4..6c949a4ca6 100755 --- a/custom_components/tuya_local/lock.py +++ b/custom_components/tuya_local/lock.py @@ -2,7 +2,7 @@ Setup for different kinds of Tuya lock devices """ -from homeassistant.components.lock import LockEntity +from homeassistant.components.lock import LockEntity, LockEntityFeature from .device import TuyaLocalDevice from .helpers.config import async_tuya_setup_platform @@ -34,6 +34,7 @@ def __init__(self, device: TuyaLocalDevice, config: TuyaEntityConfig): super().__init__() dps_map = self._init_begin(device, config) self._lock_dp = dps_map.pop("lock", None) + self._open_dp = dps_map.pop("open", None) self._unlock_fp_dp = dps_map.pop("unlock_fingerprint", None) self._unlock_pw_dp = dps_map.pop("unlock_password", None) self._unlock_tmppw_dp = dps_map.pop("unlock_temp_pwd", None) @@ -52,6 +53,8 @@ def __init__(self, device: TuyaLocalDevice, config: TuyaEntityConfig): self._approve_intercom_dp = dps_map.pop("approve_intercom", None) self._jam_dp = dps_map.pop("jammed", None) self._init_end(dps_map) + if self._open_dp and not self._open_dp.readonly: + self._attr_supported_features = LockEntityFeature.OPEN @property def is_locked(self): @@ -81,6 +84,11 @@ def is_locked(self): lock = True return lock + @property + def is_open(self): + if self._open_dp: + return self._open_dp.get_value(self._device) + @property def is_jammed(self): if self._jam_dp: @@ -143,3 +151,8 @@ async def async_unlock(self, **kwargs): await self._approve_intercom_dp.async_set_value(self._device, True) else: raise NotImplementedError() + + async def async_open(self, **kwargs): + """Open the door latch.""" + if self._open_dp: + await self._open_dp.async_set_value(self._device, True) From b3bd112c90879b632924c834e0f859e403ca9b54 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 8 Aug 2024 23:01:46 +0900 Subject: [PATCH 166/169] Essentials purifier: combine switch and mode select into a fan entity This device was the first purifier added, and the connection to fans was not yet realised, so in review it was missed that the mode select could be replaced with fan presets. Issue #2188 --- .../devices/essentials_purifier.yaml | 41 ++++++++++++++----- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/custom_components/tuya_local/devices/essentials_purifier.yaml b/custom_components/tuya_local/devices/essentials_purifier.yaml index 90b4f28454..dca62edb82 100644 --- a/custom_components/tuya_local/devices/essentials_purifier.yaml +++ b/custom_components/tuya_local/devices/essentials_purifier.yaml @@ -1,12 +1,32 @@ -name: Essentials air purifier +name: Air purifier primary_entity: - entity: switch + entity: fan + translation_key: fan_with_presets icon: "mdi:air-purifier" dps: - id: 1 type: boolean name: switch + - id: 3 + name: preset_mode + type: string + mapping: + - dps_val: auto + value: smart + - dps_val: M + value: normal + - dps_val: H + value: strong + - dps_val: sleep + value: sleep secondary_entities: + - entity: switch + deprecated: fan + icon: "mdi:air-purifier" + dps: + - id: 1 + type: boolean + name: switch - entity: sensor name: Active filter life icon: "mdi:air-filter" @@ -79,7 +99,7 @@ secondary_entities: - id: 19 type: integer name: sensor - unit: "min" + unit: min - entity: sensor class: pm25 dps: @@ -96,16 +116,17 @@ secondary_entities: name: sensor - entity: select name: Mode + deprecated: fan dps: - id: 3 name: option type: string mapping: - dps_val: auto - value: "Auto" - - dps_val: "M" - value: "Medium" - - dps_val: "H" - value: "High" - - dps_val: "sleep" - value: "Sleep" + value: Auto + - dps_val: M + value: Medium + - dps_val: H + value: High + - dps_val: sleep + value: Sleep From 786cd7f1fa5d156b11a5fe0653e4c1caf0ba63e2 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Fri, 9 Aug 2024 22:33:11 +0900 Subject: [PATCH 167/169] Add support for KW02 video doorbell Issue #2058 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 3 +- .../devices/kw02_video_doorbell.yaml | 152 ++++++++++++++++++ .../tuya_local/devices/rl_video_lock.yaml | 2 + 4 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 custom_components/tuya_local/devices/kw02_video_doorbell.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index b6a6c0022b..71efaf85c0 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -618,3 +618,4 @@ Further device support has been made with the assistance of users. Please consid - [DefinitelyADev](https://github.com/DefinitelyADev) for assisting with support for Moes zigbee dual dimmer module. - [daubman](https://github.com/daubman) for contributing support for Vevor Level 2 EV charger. - [Blcktape](https://github.com/Blcktape) for contributing support for Ion LED WiFi dimmer. +- [dobriys](https://github.com/dobriys) for assisting with support for KW02 video doorbell. diff --git a/DEVICES.md b/DEVICES.md index 32c26b5fbc..ea87fb6931 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -627,13 +627,14 @@ work reliably, even if listed below. ### Sirens -- Iebeyond ECH doorbell with 433MHz RF hub - Neo Coolcam Siren with temperature and humidity alert (NAS-AB02W) - Orion Grid Connect outdoor siren (also Elesion NX-4980) - Sirena WS-902 Plus outdoor strobe siren ### Doorbells +- Iebeyond ECH doorbell with 433MHz RF hub +- KW02 video doorbell - WHM-04 doorbell (sold under various brands) ### Cameras diff --git a/custom_components/tuya_local/devices/kw02_video_doorbell.yaml b/custom_components/tuya_local/devices/kw02_video_doorbell.yaml new file mode 100644 index 0000000000..f986794718 --- /dev/null +++ b/custom_components/tuya_local/devices/kw02_video_doorbell.yaml @@ -0,0 +1,152 @@ +name: Doorbell +products: + - id: 0ukszkfaejkqpz9o + name: KW02 IP video doorbell +primary_entity: + entity: siren + name: Doorbell + dps: + - id: 156 + type: string + optional: true + name: tone + mapping: + - dps_val: "1" + value: Tone 1 + - dps_val: "2" + value: Tone 2 + - dps_val: "3" + value: Tone 3 + - dps_val: "4" + value: Tone 4 + - id: 157 + type: integer + optional: true + name: volume_level + range: + min: 0 + max: 10 + mapping: + - scale: 10 + - id: 166 + type: integer + optional: true + name: duration + range: + min: 5 + max: 60 + - id: 186 + type: string + optional: true + name: alarm_report +secondary_entities: + - entity: light + translation_key: indicator + category: config + dps: + - id: 101 + type: boolean + name: switch + - entity: switch + name: Flip image + icon: "mdi:flip-horizontal" + category: config + dps: + - id: 103 + type: boolean + optional: true + name: switch + - entity: select + name: Motion sensitivity + icon: "mdi:motion" + category: config + dps: + - id: 106 + type: string + name: option + optional: true + mapping: + - dps_val: "0" + value: Low + - dps_val: "1" + value: Medium + - dps_val: "2" + value: High + - entity: button + name: SD format + icon: "mdi:sd" + category: config + dps: + - id: 111 + type: boolean + optional: true + name: button + - id: 109 + type: string + optional: true + name: capacity + - id: 110 + type: integer + optional: true + name: sd_status + - id: 117 + type: integer + optional: true + name: formatting_status + - entity: camera + dps: + - id: 115 + type: base64 + optional: true + name: motion_detected + - id: 134 + type: boolean + optional: true + name: motion_enable + - id: 154 + type: base64 + optional: true + name: snapshot + mapping: + - dps_val: null + value_redirect: motion_detected + - entity: event + class: doorbell + dps: + - id: 136 + type: string + name: event + optional: true + mapping: + - dps_val: "" + value: null + - dps_val: null + value: null + - value: ring + - id: 136 + type: string + optional: true + name: raw_event + - entity: number + name: Volume + category: config + icon: "mdi:volume-high" + dps: + - id: 160 + type: integer + optional: true + name: value + unit: "%" + range: + min: 1 + max: 10 + mapping: + - scale: 0.1 + - entity: button + class: restart + category: config + dps: + - id: 162 + type: boolean + optional: true + name: button diff --git a/custom_components/tuya_local/devices/rl_video_lock.yaml b/custom_components/tuya_local/devices/rl_video_lock.yaml index b6d54aab81..69671d0e1c 100644 --- a/custom_components/tuya_local/devices/rl_video_lock.yaml +++ b/custom_components/tuya_local/devices/rl_video_lock.yaml @@ -42,4 +42,6 @@ secondary_entities: mapping: - dps_val: "" value: null + - dps_val: null + value: null - value: ring From 0783472951a16509762213773b81478ceb4a761c Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 10 Aug 2024 14:16:44 +0900 Subject: [PATCH 168/169] Matsee 2-way energy meter: support another variant. - Another variant exists which uses different dps for forward and reverse energy sensors. Support this variant also. - Add missing direction attribute Issue #2063 --- .../devices/matsee_2way_energymeter.yaml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/custom_components/tuya_local/devices/matsee_2way_energymeter.yaml b/custom_components/tuya_local/devices/matsee_2way_energymeter.yaml index 601beb045c..b71948cca5 100644 --- a/custom_components/tuya_local/devices/matsee_2way_energymeter.yaml +++ b/custom_components/tuya_local/devices/matsee_2way_energymeter.yaml @@ -2,6 +2,8 @@ name: Bidirectional energy meter products: - id: z95s7p3z54xbsjnl name: MatSee Plus bidirectional 2 channel clamp meter + - id: bbcg1hrkrj5rifsd + name: MatSee Plus bidirectional 2 channel clamp meter primary_entity: entity: sensor name: Energy consumed @@ -9,9 +11,19 @@ primary_entity: dps: - id: 1 type: integer + optional: true name: sensor unit: kWh class: total_increasing + mapping: + - dps_val: null + value_redirect: alternate + - scale: 100 + - id: 130 + type: integer + optional: true + name: alternate + hidden: true mapping: - scale: 100 secondary_entities: @@ -21,9 +33,19 @@ secondary_entities: dps: - id: 2 type: integer + optional: true name: sensor unit: kWh class: total_increasing + mapping: + - dps_val: null + value_redirect: 131 + - scale: 100 + - id: 131 + type: integer + optional: true + name: alternate + hidden: true mapping: - scale: 100 - entity: sensor @@ -38,6 +60,10 @@ secondary_entities: class: measurement mapping: - scale: 10 + - id: 102 + type: string + optional: true + name: direction - id: 118 type: integer name: calibration @@ -55,6 +81,10 @@ secondary_entities: class: measurement mapping: - scale: 10 + - id: 104 + type: string + optional: true + name: direction - id: 124 type: integer name: calibration From ff031a3857aea32d9062e4abe1b6a803649637c7 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 10 Aug 2024 19:43:50 +0900 Subject: [PATCH 169/169] Matsee: fix redirect --- .../tuya_local/devices/matsee_2way_energymeter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/matsee_2way_energymeter.yaml b/custom_components/tuya_local/devices/matsee_2way_energymeter.yaml index b71948cca5..37f7b05f70 100644 --- a/custom_components/tuya_local/devices/matsee_2way_energymeter.yaml +++ b/custom_components/tuya_local/devices/matsee_2way_energymeter.yaml @@ -39,7 +39,7 @@ secondary_entities: class: total_increasing mapping: - dps_val: null - value_redirect: 131 + value_redirect: alternate - scale: 100 - id: 131 type: integer