Parcourir la source

Add support for Arlec PCTH01HA temperature and humidity smartplugs.

Issue #499
Jason Rumney il y a 2 ans
Parent
commit
4d499130de

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -204,4 +204,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [Oglaf](https://github.com/Oglaf) for contributing support for Kabum Smart 500 vacuum cleaners.
 - [Whytey](https://github.com/Whytey/pymoebot) for investigation work into the MoeBot protocol.
 - [launchm](https://github.com/launchm) for assisting with support for Asakuki aroma diffusers.
-
+- [ajvandr](https://github.com/ajvandr) for assisting with support for Arlec temperature and humidity smart switches.

+ 1 - 0
DEVICES.md

@@ -64,6 +64,7 @@
 
 ### Thermostats
 
+- Arlec PCTH01HA temperature/humidity smart switch
 - Avatto WT100 thermostat
 - Awow/Mi-heat TH213 thermostat (two variants)
 - Beca BAC-002 thermostat

+ 260 - 0
custom_components/tuya_local/devices/arlec_thermostat_smartplug.yaml

@@ -0,0 +1,260 @@
+name: Arlec thermostat smartplug
+product:
+  - id: 1z2w76xtiawhxleg
+    name: Arlec PCTH01HA
+primary_entity:
+  entity: climate
+  dps:
+    - id: 2
+      type: boolean
+      name: hvac_mode
+      mapping:
+        - dps_val: false
+          value: "off"
+        - dps_val: true
+          constraint: work_mode
+          conditions:
+            - dps_val: "hot"
+              value: "heat"
+            - dps_val: "dehumidify"
+              value: "dry"
+            - dps_val: "colding"
+              value: "cool"
+            - dps_val: "wet"
+              value: "fan_only"
+    - id: 7
+      type: string
+      name: cycle_time
+      optional: true
+    - id: 8
+      type: string
+      name: work_mode
+      hidden: true
+    - id: 19
+      type: bitfield
+      name: factory_test
+      optional: true
+    - id: 20
+      type: string
+      name: temperature_unit
+      mapping:
+        - dps_val: c
+          value: C
+        - dps_val: f
+          value: F
+    - id: 21
+      name: temp_set_f
+      type: integer
+      hidden: true
+      mapping:
+        - scale: 10
+          step: 5
+      range:
+        min: -40
+        max: 2210
+    - id: 22
+      name: temperature
+      type: integer
+      range:
+        min: -200
+        max: 1050
+      mapping:
+        - constraint: temperature_unit
+          conditions:
+            - dps_val: f
+              value_redirect: temp_set_f
+              range:
+                min: -40
+                max: 2210
+          scale: 10
+          step: 5
+    - id: 27
+      type: integer
+      name: current_temperature
+      mapping:
+        - scale: 10
+          constraint: temperature_unit
+          conditions:
+            - dps_val: f
+              value_redirect: cur_temp_f
+    - id: 28
+      type: integer
+      name: cur_temp_f
+      hidden: true
+      mapping:
+        - scale: 10
+    - id: 41
+      type: integer
+      name: humidity
+      range:
+        min: 1
+        max: 99
+secondary_entities:
+  - entity: number
+    name: Timer
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 4
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: switch
+    name: Customize mode
+    icon: "mdi:tune"
+    category: config
+    dps:
+      - id: 9
+        type: boolean
+        name: switch
+  - entity: sensor
+    name: Current
+    class: current
+    category: diagnostic
+    dps:
+      - id: 11
+        type: integer
+        name: sensor
+        unit: mA
+        class: measurement
+      - id: 15
+        type: integer
+        name: calibration
+        optional: true
+  - entity: sensor
+    name: Power
+    class: power
+    category: diagnostic
+    dps:
+      - id: 12
+        type: integer
+        name: sensor
+        unit: W
+        class: measurement
+        mapping:
+          - scale: 10
+      - id: 10
+        type: integer
+        name: add_ele
+        optional: true
+      - id: 17
+        type: integer
+        name: ele_calibration
+        optional: true
+      - id: 16
+        type: integer
+        name: calibration
+        optional: true
+      - id: 18
+        type: integer
+        name: limit
+        mapping:
+          - scale: 10
+  - entity: sensor
+    name: Voltage
+    class: voltage
+    category: diagnostic
+    dps:
+      - id: 13
+        type: integer
+        name: sensor
+        unit: V
+        class: measurement
+        mapping:
+          - scale: 10
+      - id: 14
+        type: integer
+        name: calibration
+        optional: true
+  - entity: select
+    name: Temperature unit
+    icon: "mdi:temperature-celsius"
+    category: config
+    dps:
+      - id: 20
+        type: string
+        name: option
+        mapping:
+          - dps_val: c
+            value: Celsius
+          - dps_val: f
+            value: Fahrenheit
+  - entity: number
+    name: Temperature hysteresis
+    category: config
+    icon: "mdi:arrow-collapse-vertical"
+    dps:
+      - id: 
+        type: integer
+        name: value 
+        range:
+          min: 10
+          max: 90
+        mapping:
+          - scale: 10
+            step: 5
+  - entity: number
+    name: Temperature correction
+    category: config
+    icon: "mdi:pan-vertical"
+    dps:
+      - id: 
+        type: integer
+        name: value
+        range:
+          min: -9
+          max: 9
+  - entity: number
+    name: Humidity hysteresis
+    category: config
+    icon: "mdi:arrow-collapse-vertical"
+    dps:
+      - id: 42
+        type: integer
+        name: value
+        range:
+          min: 2
+          max: 20
+        mapping:
+          - step: 2
+  - entity: number
+    name: Humidity correction
+    category: config
+    icon: "mdi:pan-vertical"
+    dps:
+      - id: 47
+        type: integer
+        name: value
+        range:
+          min: -9
+          max: 9
+  - entity: number
+    name: Cold delay
+    category: config
+    icon: "mdi:camera-timer"
+    dps:
+      - id: 55
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 10
+  - entity: switch
+    name: Cold delay enable
+    icon: "mdi:camera-timer"
+    category: config
+    dps:
+      - id: 56
+        type: boolean
+        name: switch
+
+
+
+