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

support for modern flames orion device lights/flame only mode (#5264)

* changed off to cool for lights/flame only mode

* modified:   modernflames_orion_fireplace.yaml
  move climate from boolean switch to pure hvac_mode with preset
  rename eco to low heat, boost to high heat
  added boolean switch for power control

* fix(modernflames_orion_fireplace): remove whitespace and unnecessary scaling

- trim whitespace to solve lint error
- remove scaling of brightness, as it can auto scale when range is given

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Michael 1 неделя назад
Родитель
Сommit
40497e2dbe
1 измененных файлов с 28 добавлено и 30 удалено
  1. 28 30
      custom_components/tuya_local/devices/modernflames_orion_fireplace.yaml

+ 28 - 30
custom_components/tuya_local/devices/modernflames_orion_fireplace.yaml

@@ -4,28 +4,40 @@ products:
     manufacturer: Modern Flames
     model: Orion
 entities:
-  - entity: climate
+  - entity: switch
     icon: "mdi:campfire"
     dps:
       - id: 1
-        name: hvac_mode
         type: boolean
+        name: switch
+
+  - entity: climate
+    icon: "mdi:campfire"
+    dps:
+      - id: 113
+        name: hvac_mode
+        type: string
         mapping:
-          - dps_val: false
+          - dps_val: HIGH_HEAT
+            value: heat
+          - dps_val: LOW_HEAT
+            value: heat
+          - dps_val: FAN
+            value: fan_only
+          - dps_val: "OFF"
             value: "off"
-          - dps_val: true
-            constraint: preset_mode
-            conditions:
-              - dps_val: HIGH_HEAT
-                value: heat
-              - dps_val: LOW_HEAT
-                value: heat
-                hidden: true
-              - dps_val: FAN
-                value: fan_only
-              - dps_val: "OFF"
-                value: "off"
-                hidden: true
+      - id: 113
+        name: preset_mode
+        type: string
+        mapping:
+          - dps_val: "OFF"
+            value: None
+          - dps_val: "FAN"
+            value: Fan only
+          - dps_val: "LOW_HEAT"
+            value: Low heat
+          - dps_val: "HIGH_HEAT"
+            value: High heat
       - id: 2
         name: temperature
         type: integer
@@ -55,18 +67,6 @@ entities:
           min: 68
           max: 90
         hidden: true
-      - id: 113
-        name: preset_mode
-        type: string
-        mapping:
-          - dps_val: "OFF"
-            value: none
-          - dps_val: "FAN"
-            value: Fan only
-          - dps_val: "LOW_HEAT"
-            value: eco
-          - dps_val: "HIGH_HEAT"
-            value: boost
       - id: 122
         name: custom
         type: string
@@ -225,8 +225,6 @@ entities:
         range:
           min: 0
           max: 100
-        mapping:
-          - scale: 0.392
       - id: 105
         name: named_color
         type: string