From c648bed9f012760c8ea13e8dc6124963ea1b4757 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 28 Jul 2024 21:35:24 +0900 Subject: [PATCH] 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