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

Add support for Beok TR8B thermostat

Issue #737
Jason Rumney 2 лет назад
Родитель
Сommit
ea6e7fb90b
3 измененных файлов с 260 добавлено и 0 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 258 0
      custom_components/tuya_local/devices/beok_tr8b_thermostat.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -282,3 +282,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [kajapa](https://github.com/kajapa) for contributing support for Proscenic A8 air purifiers.
 - [Pagi13](https://github.com/Pagi13) for assisting with support for DTS238-7 smart meters.
 - [kshepard339](https://github.com/kshepard339) for assisting with support for Petlibro pet feeder with camera.
+- [mkrznar](https://github.com/mkrznar) for assisting with support for Beok TR8B thermostats.

+ 1 - 0
DEVICES.md

@@ -79,6 +79,7 @@
 - Beca BHT-6000/8000 floor heating thermostat
 - Beok TGR81 thermostat (also reported working with Myuet ME98, Avatto WT81/ME81)
 - Beok TOL47 thermostat
+- Beok TR8B thermostat
 - Beok TR9B thermostat _(rebadged as Vancoo and perhaps others)_
 - BHT-002-GALW thermostat _(rebadged as many different brands)_
 - ETOP-HP thermostat (CH7100)

+ 258 - 0
custom_components/tuya_local/devices/beok_tr8b_thermostat.yaml

@@ -0,0 +1,258 @@
+name: Beok TR8B thermostat
+primary_entity:
+  entity: climate
+  dps:
+    - id: 1
+      type: boolean
+      name: hvac_mode
+      mapping:
+        - dps_val: false
+          value: "off"
+        - dps_val: true
+          constraint: preset_mode
+          conditions:
+            - dps_val: cool
+              value: cool
+            - dps_val: ventil
+              value: fan_only
+            - dps_val: heat
+              value: heat
+            - dps_val: floor
+              value: cool
+            - dps_val: floor_heat
+              value: heat
+    - id: 2
+      type: string
+      name: preset_mode
+      mapping:
+        - dps_val: cool
+          value: Cool
+        - dps_val: ventil
+          value: Fan only
+        - dps_val: heat
+          value: Heat
+        - dps_val: floor
+          value: Floor cool
+        - dps_val: floor_heat
+          value: Floor heat
+    - id: 16
+      type: integer
+      name: temperature
+      range:
+        min: 50
+        max: 2000
+      mapping:
+        - scale: 10
+          step: 5
+          constraint: temperature_unit
+          conditions:
+            - dps_val: f
+              step: 10
+    - id: 19
+      type: integer
+      name: max_temperature
+      mapping:
+        - scale: 10
+    - id: 23
+      type: string
+      name: temperature_unit
+      mapping:
+        - dps_val: c
+          value: C
+        - dps_val: f
+          value: F
+    - id: 24
+      type: integer
+      name: current_temperature
+      mapping:
+        - scale: 10
+    - id: 26
+      type: integer
+      name: min_temperature
+      mapping:
+        - scale: 10
+    - id: 28
+      type: string
+      name: fan_mode
+      mapping:
+        - dps_val: auto
+          value: auto
+        - dps_val: low
+          value: low
+        - dps_val: middle
+          value: medium
+        - dps_val: high
+          value: high
+    - id: 36
+      type: string
+      name: hvac_action
+      mapping:
+        - dps_val: open
+          constraint: preset_mode
+          conditions:
+            - dps_val: [ cool, floor ]
+              value: cooling
+            - dps_val: [ heat, floor_heat ]
+              value: heating
+            - value: idle
+        - dps_val: close
+          constraint: hvac_mode
+          conditions:
+            - dps_val: false
+              value: "off"
+            - dps_val: true
+              value: idle
+    - id: 45
+      type: bitfield
+      name: fault_code
+    - id: 101
+      type: bitfield
+      name: features
+    - id: 102
+      type: integer
+      name: temperature_step
+      mapping:
+        - scale: 10
+    - id: 104
+      type: bitfield
+      name: valid_modes
+    - id: 105
+      type: string
+      name: model
+    - id: 106
+      type: string
+      name: light_mode
+secondary_entities:
+  - entity: switch
+    name: Anti-frost
+    icon: "mdi:snowflake"
+    category: config
+    dps:
+      - id: 10
+        type: boolean
+        name: switch
+  - entity: select
+    name: Temperature units
+    icon: "mdi:temperature-celsius"
+    category: config
+    dps:
+      - id: 23
+        type: string
+        name: option
+        mapping:
+          - dps_val: c 
+            value: Celsius
+          - dps_val: f
+            value: Fahrenheit
+  - entity: number
+    name: Maximum temperature
+    category: config
+    icon: "mdi:thermometer-chevron-up"
+    dps:
+      - id: 19
+        type: integer
+        name: value
+        range:
+          min: 50
+          max: 2000
+        mapping:
+          - scale: 10
+            step: 10
+      - id: 23
+        type: string
+        name: unit
+        mapping:
+          - dps_val: c
+            value: C
+          - dps_val: f
+            value: F
+  - entity: number
+    name: Minimum temperature
+    category: config
+    icon: "mdi:thermometer-chevron-down"
+    dps:
+      - id: 26
+        type: integer
+        name: value
+        range:
+          min: 50
+          max: 2000
+        mapping:
+          - scale: 10
+            step: 10
+      - id: 23
+        type: string
+        name: unit
+        mapping:
+          - dps_val: c
+            value: C
+          - dps_val: f
+            value: F
+  - entity: select
+    name: Schedule
+    icon: "mdi:calendar-clock"
+    category: config
+    dps:
+      - id: 31
+        type: string
+        name: option
+        mapping:
+          - dps_val: "5_2"
+            value: Weekdays+weekend
+          - dps_val: "6_1"
+            value: Mon-Sat+Sun
+          - dps_val: "7"
+            value: Daily
+      - id: 30
+        type: string
+        value: week_program
+      - id: 103
+        type: string
+        value: schedule
+  - entity: lock
+    name: Child lock
+    icon: "mdi:hand-back-right-off"
+    category: config
+    dps:
+      - id: 40
+        type: boolean
+        name: lock
+  - entity: binary_sensor
+    name: Fault
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 45
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+  - entity: sensor
+    name: Battery
+    class: battery
+    dps:
+      - id: 107
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+  - entity: number
+    name: Temperature calibration
+    category: config
+    icon: "mdi:thermometer-check"
+    dps:
+      - id: 109
+        type: integer
+        name: value
+        range:
+          min: -99
+          max: 99
+        mapping:
+          - scale: 10
+      - id: 108
+        type: integer
+        name: step
+        mapping:
+          - scale: 10