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

Touchstone Sideline electric fireplace Red Blue variant (#5089)

* Create touchstone_sideline_v2_fireplace.yaml

* Update touchstone_sideline_v2_fireplace.yaml

Added Celcius support, fixed thermostat and temp control options, updated brightness options as percents

* Update touchstone_sideline_v2_fireplace.yaml

Address pytest comments

* Update touchstone_sideline_v2_fireplace.yaml

* feat(touchstone_sidelineredblue_fireplace): changes from review

- Add more descriptive "redblue" in filename rather than v2
- Follow same entity pattern as existing touchstone fireplace

PR #5089

* Add translation key for heater back in

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Sean McGuire 10 часов назад
Родитель
Сommit
168dfda667

+ 241 - 0
custom_components/tuya_local/devices/touchstone_sidelineredblue_fireplace.yaml

@@ -0,0 +1,241 @@
+name: Electric fireplace
+entities:
+  - entity: climate
+    translation_key: heater
+    dps:
+      - id: 1
+        type: boolean
+        name: hvac_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            constraint: heat_disable
+            conditions:
+              - dps_val: false
+                value: heat
+              - dps_val: true
+                value: fan_only
+      - id: 2
+        name: temperature
+        optional: true
+        type: integer
+        range:
+          min: 16
+          max: 31
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: f
+                range:
+                  min: 60
+                  max: 88
+                value_redirect: temp_set_f
+      - id: 3
+        name: current_temperature
+        type: integer
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: f
+                value_redirect: temp_current_f
+      - id: 5
+        name: preset_mode
+        type: string
+        mapping:
+          - dps_val: "0"
+            value: none
+          - dps_val: "1"
+            value: low
+          - dps_val: "2"
+            value: high
+          - dps_val: "3"
+            value: auto
+      - id: 13
+        name: temperature_unit
+        type: string
+        mapping:
+          - dps_val: c
+            value: C
+          - dps_val: f
+            value: F
+      - id: 14
+        name: temp_set_f
+        type: integer
+        optional: true
+        hidden: true
+        range:
+          min: 60
+          max: 88
+      - id: 15
+        name: temp_current_f
+        type: integer
+        optional: true
+        hidden: true
+      - id: 107
+        type: boolean
+        name: heat_disable
+        hidden: true
+  - entity: select
+    translation_key: temperature_unit
+    category: config
+    dps:
+      - id: 13
+        type: string
+        name: option
+        mapping:
+          - dps_val: c
+            value: celsius
+          - dps_val: f
+            value: fahrenheit
+  - entity: light
+    translation_key: flame
+    category: config
+    dps:
+      - id: 102
+        name: brightness
+        type: string
+        mapping:
+          - dps_val: "0"
+            value: 0
+          - dps_val: "1"
+            value: 51
+          - dps_val: "2"
+            value: 102
+          - dps_val: "3"
+            value: 153
+          - dps_val: "4"
+            value: 204
+          - dps_val: "5"
+            value: 255
+      - id: 101
+        name: effect
+        type: string
+        mapping:
+          - dps_val: "1"
+            value: "Red + Blue"
+          - dps_val: "2"
+            value: "Red"
+          - dps_val: "3"
+            value: "Blue"
+  - entity: select
+    name: Flame speed
+    icon: "mdi:speedometer"
+    category: config
+    dps:
+      - id: 103
+        type: string
+        name: option
+        mapping:
+          - dps_val: "1"
+            value: "1"
+          - dps_val: "2"
+            value: "2"
+          - dps_val: "3"
+            value: "3"
+          - dps_val: "4"
+            value: "4"
+          - dps_val: "5"
+            value: "5"
+  - entity: light
+    translation_key: embers
+    category: config
+    dps:
+      - id: 109
+        name: brightness
+        type: string
+        optional: true
+        mapping:
+          - dps_val: L5
+            value: 0
+          - dps_val: L0
+            value: 51
+          - dps_val: L1
+            value: 102
+          - dps_val: L2
+            value: 153
+          - dps_val: L3
+            value: 204
+          - dps_val: L4
+            value: 255
+          - dps_val: null
+            value: 0
+            hidden: true
+      - id: 104
+        name: named_color
+        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: teal
+          - dps_val: "8"
+            value: pink
+          - dps_val: "9"
+            value: white
+          - dps_val: "10"
+            value: peachpuff
+          - dps_val: "11"
+            value: black
+          - dps_val: "12"
+            value: grey
+      - id: 104
+        name: effect
+        type: string
+        mapping:
+          - dps_val: "12"
+            value: Mystery
+          - dps_val: "11"
+            value: Cycle
+          - dps_val: "1"
+            value: "off"
+          - value: "off"
+            hidden: true
+  - entity: select
+    translation_key: timer
+    category: config
+    dps:
+      - id: 106
+        type: string
+        name: option
+        mapping:
+          - dps_val: "cancel"
+            value: "cancel"
+          - dps_val: "0"
+            value: "cancel"
+            hidden: true
+          - dps_val: "30"
+            value: "30m"
+          - dps_val: "1H"
+            value: "1h"
+          - dps_val: "2H"
+            value: "2h"
+          - dps_val: "3H"
+            value: "3h"
+          - dps_val: "4H"
+            value: "4h"
+          - dps_val: "5H"
+            value: "5h"
+          - dps_val: "6H"
+            value: "6h"
+          - dps_val: "7H"
+            value: "7h"
+          - dps_val: "8H"
+            value: "8h"
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 108
+        type: boolean
+        name: lock