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

Add support for Medern Flames Orion fireplace

Issue #1247
Jason Rumney 2 лет назад
Родитель
Сommit
c393f94364

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -415,3 +415,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [Cadish](https://github.com/Cadish) for assisting with support for Qlima D820A dehumidifiers.
 - [mellow8](https://github.com/mellow8) for assisting with support for ZM-Wi-Fi smart meters.
 - [KodzghlyCZ](https://github.com/KodzghlyCZ) for assisting with support for Tesla Smart humidifiers.
+- [simplelnx](https://github.com/simplelnx) for assisting with support for Modern Flames Orion fireplaces.

+ 1 - 0
DEVICES.md

@@ -28,6 +28,7 @@
 - Kogan flame effect heater - KAWHMFP20BA model
 - Kogan tower heater - KASTHFP2KWA model
 - Kogan Wi-Fi convection panel heaters - KAHTP and KAWFHTP models
+- Modern Flames Orion fireplace
 - MRC Magnum floor heating
 - Nedis ceramic PTC fan heater
 - Nedis convection heater - WIFIHTPL20F model

+ 333 - 0
custom_components/tuya_local/devices/modernflames_orion_fireplace.yaml

@@ -0,0 +1,333 @@
+name: Fireplace
+products:
+  - id: buigpagr3xzmj6zk
+    name: Modern Flames Orion
+primary_entity:
+  entity: climate
+  icon: "mdi:campfire"
+  dps:
+    - id: 1
+      name: hvac_mode
+      type: boolean
+      mapping:
+        - dps_val: false
+          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: 2
+      name: temperature
+      type: integer
+      range:
+        min: 20
+        max: 31
+      mapping:
+        - constraint: temperature_unit
+          conditions:
+            - dps_val: f
+              value_redirect: temp_set_f
+              range:
+                min: 68
+                max: 90
+    - id: 9
+      name: temperature_unit
+      type: string
+      mapping:
+        - dps_val: f
+          value: F
+        - dps_val: c
+          value: C
+    - id: 10
+      name: temp_set_f
+      type: integer
+      range:
+        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
+      optional: true
+    - id: 123
+      type: string
+      name: save_custom
+      optional: true
+secondary_entities:
+  - entity: select
+    name: Temperature unit
+    icon: "mdi:temperature-celsius"
+    category: config
+    dps:
+      - id: 9
+        type: string
+        name: option
+        mapping:
+          - dps_val: c
+            value: Celsius
+          - dps_val: f
+            value: Fahrenheit
+  - entity: select
+    name: Timer
+    icon: "mdi:timer"
+    category: config
+    dps:
+      - id: 13
+        type: string
+        name: option
+        mapping:
+          - dps_val: "00"
+            value: "Off"
+          - dps_val: "30"
+            value: "30 minutes"
+          - 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"
+      - id: 114
+        type: string
+        optional: true
+        name: week_program_1
+      - id: 115
+        type: string
+        optional: true
+        name: week_program_2
+      - id: 116
+        type: string
+        optional: true
+        name: week_program_3
+      - id: 117
+        type: string
+        optional: true
+        name: week_program_4
+      - id: 118
+        type: string
+        optional: true
+        name: week_program_5
+      - id: 119
+        type: string
+        optional: true
+        name: week_program_6
+      - id: 120
+        type: string
+        optional: true
+        name: week_program_7
+  - entity: sensor
+    name: Time remaining
+    class: duration
+    category: diagnostic
+    dps:
+      - id: 14
+        type: integer
+        name: sensor
+        unit: s
+  - entity: select
+    name: Flame style
+    icon: "mdi:fire"
+    category: config
+    dps:
+      - id: 101
+        type: string
+        name: option
+        mapping:
+          - dps_val: ONE
+            value: One
+          - dps_val: TWO
+            value: Two
+          - dps_val: THREE
+            value: Three
+  - entity: light
+    name: Flame
+    category: config
+    dps:
+      - id: 104
+        name: brightness
+        type: string
+        mapping:
+          - dps_val: OFF
+            value: 0
+          - dps_val: DEFAULT
+            value: 82
+          - dps_val: MEDIUM
+            value: 164
+          - dps_val: HIGH
+            value: 255
+      - id: 102
+        name: effect
+        type: string
+        mapping:
+          - dps_val: YELLOW
+            value: Yellow
+          - dps_val: ORANGE
+            value: Orange
+          - dps_val: BLUE
+            value: Blue
+          - dps_val: GREEN
+            value: Green
+          - dps_val: PURPLE
+            value: Purple
+          - dps_val: WHITE
+            value: White
+  - entity: select
+    name: Flame speed
+    icon: "mdi:fire"
+    category: config
+    dps:
+      - id: 103
+        type: string
+        name: option
+        mapping:
+          - dps_val: SLOW
+            value: Slow
+          - dps_val: DEFAULT
+            value: Default
+          - dps_val: FAST
+            value: Fast
+  - entity: light
+    name: Downlight
+    icon: "mdi:spotlight-beam"
+    category: config
+    dps:
+      - id: 106
+        name: brightness
+        type: integer
+        range:
+          min: 0
+          max: 100
+        mapping:
+          - scale: 0.392
+      - id: 105
+        name: effect
+        type: string
+        mapping:
+          - dps_val: "1"
+            value: Orange
+          - dps_val: "2"
+            value: Red
+          - dps_val: "3"
+            value: Blue
+          - dps_val: "4"
+            value: Yellow
+          - dps_val: "5"
+            value: Green
+          - dps_val: "6"
+            value: Purple
+          - dps_val: "7"
+            value: Sky blue
+          - dps_val: "8"
+            value: Magenta
+          - dps_val: "9"
+            value: White
+          - dps_val: "10"
+            value: Pink
+  - entity: switch
+    name: Downlight night mode
+    category: config
+    icon: "mdi:power-sleep"
+    dps:
+      - id: 107
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Downlight color cycle
+    icon: "mdi:spotlight-beam"
+    category: config
+    dps:
+      - id: 108
+        type: boolean
+        name: switch
+  - entity: light
+    name: Embers
+    category: config
+    icon: "mdi:campfire"
+    dps:
+      - id: 110
+        name: brightness
+        type: integer
+        range:
+          min: 0
+          max: 100
+        mapping:
+          - scale: 0.392
+      - id: 109
+        name: effect
+        type: string
+        mapping:
+          - dps_val: "1"
+            value: Orange
+          - dps_val: "2"
+            value: Red
+          - dps_val: "3"
+            value: Blue
+          - dps_val: "4"
+            value: Yellow
+          - dps_val: "5"
+            value: Green
+          - dps_val: "6"
+            value: Purple
+          - dps_val: "7"
+            value: Sky blue
+          - dps_val: "8"
+            value: Magenta
+          - dps_val: "9"
+            value: White
+          - dps_val: "10"
+            value: Pink
+  - entity: switch
+    name: Ember extras
+    icon: "mdi:campfire"
+    category: config
+    dps:
+      - id: 111
+        type: boolean
+        name: switch        
+  - entity: switch
+    name: Ember color cycle
+    icon: "mdi:campfire"
+    category: config
+    dps:
+      - id: 112
+        type: boolean
+        name: switch
+  - entity: button
+    name: Factory reset
+    class: restart
+    category: config
+    dps:
+      - id: 121
+        type: boolean
+        name: button
+        optional: true