Просмотр исходного кода

Add kettle preset selects (#4972)

## Summary

Adds optional DP106 and DP107 preset select entities to the existing
Korex AX-WF306N kettle config.

This is a device-config-only PR. No Python code changes are included.

## Why

The existing config already covers the core kettle functions. The same
product also exposes two additional preset controls:

- `106`: Boil preset
- `107`: Boil and cool preset

These are separate from the existing DP101 temperature control and
appear to be app-style preset selections.

## Tested device

- Manufacturer/model: Korex AX-WF306N / Kogan smart kettle variant
- Product ID / productKey: `2vuvtw0cj8wmjrpc`
- Protocol/interface used locally: `3.3`

## Existing config

The existing Tuya Local config already supports this product ID as a
kettle using DPs `1`, `5`, `10`, `101`, `102`, `103`, `104`, and `105`.

## Added datapoints

- `106`: Boil preset
- `107`: Boil and cool preset

## Validation

- Tested locally with LocalTuya-style DP mapping
- Existing power, current temperature, keep-warm, and status behavior
work
- DP106 exposes boil preset options
- DP107 exposes boil-and-cool preset options
- No local keys, device IDs, IP addresses, or private account data are
included

## Reference

Original Home Assistant community post documenting the LocalTuya setup
and DP106/DP107 usage:


https://community.home-assistant.io/t/korex-ax-wf306n-smart-kettle-works-perfectly-with-localtuya/909674

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
locoscientist 1 месяц назад
Родитель
Сommit
eb962731a8

+ 56 - 0
custom_components/tuya_local/devices/korex_axwf306n_smart_kettle.yaml

@@ -204,3 +204,59 @@ entities:
       - id: 103
         type: boolean
         name: keep_warm
+  - entity: select
+    translation_key: kettle_mode
+    dps:
+      - id: 106
+        type: string
+        name: option
+        optional: true
+        mapping:
+          - constraint: keep_warm
+            conditions:
+              - dps_val: true
+                value_redirect: warm_preset
+                mapping:
+                  - dps_val: "0"
+                    value: infant_formula
+                  - dps_val: "1"
+                    value: water
+                  - dps_val: "2"
+                    value: honey_water
+                  - dps_val: "3"
+                    value: white_tea
+                  - dps_val: "4"
+                    value: green_tea
+                  - dps_val: "5"
+                    value: oolong_tea
+                  - dps_val: "6"
+                    value: coffee
+                  - dps_val: "7"
+                    value: boil
+              - dps_val: false
+                mapping:
+                  - dps_val: "0"
+                    value: infant_formula
+                  - dps_val: "1"
+                    value: water
+                  - dps_val: "2"
+                    value: honey_water
+                  - dps_val: "3"
+                    value: white_tea
+                  - dps_val: "4"
+                    value: green_tea
+                  - dps_val: "5"
+                    value: oolong_tea
+                  - dps_val: "6"
+                    value: coffee
+                  - dps_val: "7"
+                    value: boil
+      - id: 107
+        type: string
+        name: warm_preset
+        optional: true
+        hidden: true
+      - id: 103
+        type: boolean
+        name: keep_warm
+        hidden: true