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

feat(rohnson_r28858_airfryer): add R-2834 model

Small differences in details:
  - Temperature range 80-200 instead of 80-220 (not implemented, as
    C/F variants already use the conditional mapping)
  - has custom recipe, does not have sausage or dryfruit
  - smaller range for cloud recipe id
  - only allows setting the cooking timer up to 1h instead of 24h
  - event messages differ (alarm_clock instead of alarm, stop_cooking
    instead of finish_cooking)
  - does not have Tender griller switch (made this optional and use
    absence select model specific config)

Issue #6318
Jason Rumney 1 день назад
Родитель
Сommit
d50b2f7c77
1 измененных файлов с 61 добавлено и 1 удалено
  1. 61 1
      custom_components/tuya_local/devices/rohnson_r28858_airfryer.yaml

+ 61 - 1
custom_components/tuya_local/devices/rohnson_r28858_airfryer.yaml

@@ -4,6 +4,10 @@ products:
     manufacturer: Rohnson
     model: SmartChef XL2
     model_id: R-2858
+  - id: vcutq3cp9e8clwwv
+    manufacturer: Rohnson
+    model: SmartChef XL
+    model_id: R-2834
 entities:
   - entity: climate
     translation_only_key: oven
@@ -94,10 +98,31 @@ entities:
             value: pizza
           - dps_val: sausage
             value: sausage
+            available: r2858
           - dps_val: chips
             value: fries
           - dps_val: dryfruit
             value: dry_fruit
+            available: r2858
+          - dps_val: custom
+            value: custom
+            available: r2834
+      - id: 110
+        type: boolean
+        optional: true
+        name: r2834
+        mapping:
+          - dps_val: null
+            value: true
+          - value: false
+      - id: 110
+        type: boolean
+        optional: true
+        name: r2858
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: number
     name: Cloud recipe
     category: config
@@ -112,6 +137,17 @@ entities:
         range:
           min: 0
           max: 999999999
+        mapping:
+          - constraint: model
+            conditions:
+              - dps_val: null
+                range:
+                  min: 0
+                  max: 999999
+      - id: 110
+        type: boolean
+        optional: true
+        name: model
   - entity: time
     name: Cooking time
     translation_key: timer
@@ -125,6 +161,17 @@ entities:
         range:
           min: 0
           max: 1440
+        mapping:
+          - constraint: model
+            conditions:
+              - dps_val: null
+                range:
+                  min: 0
+                  max: 60
+      - id: 110
+        type: boolean
+        optional: true
+        name: model
   - entity: sensor
     translation_key: time_remaining
     class: duration
@@ -204,16 +251,29 @@ entities:
             value: null
           - dps_val: alarm
             value: turn_over
+          - dps_val: alarm_clock
+            value: turn_over
+            hidden: true
           - dps_val: finish_cooking
             value: done
+          - dps_val: stop_cooking
+            value: done
+            hidden: true
   - entity: switch
     name: Tender griller
     icon: "mdi:grill"
     category: config
+    hidden: unavailable
     dps:
-      - id: 1
+      - id: 110
         type: boolean
+        optional: true
         name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
       - id: 110
         type: boolean
+        optional: true
         name: switch