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

Add support for PNI CT45 thermostat

Issue $4267
Jason Rumney 4 дней назад
Родитель
Сommit
15795644fa
26 измененных файлов с 597 добавлено и 0 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 572 0
      custom_components/tuya_local/devices/pni_ct45_thermostat.yaml
  4. 1 0
      custom_components/tuya_local/translations/bg.json
  5. 1 0
      custom_components/tuya_local/translations/ca.json
  6. 1 0
      custom_components/tuya_local/translations/cz.json
  7. 1 0
      custom_components/tuya_local/translations/de.json
  8. 1 0
      custom_components/tuya_local/translations/el.json
  9. 1 0
      custom_components/tuya_local/translations/en.json
  10. 1 0
      custom_components/tuya_local/translations/es.json
  11. 1 0
      custom_components/tuya_local/translations/fr.json
  12. 1 0
      custom_components/tuya_local/translations/hu.json
  13. 1 0
      custom_components/tuya_local/translations/id.json
  14. 1 0
      custom_components/tuya_local/translations/it.json
  15. 1 0
      custom_components/tuya_local/translations/ja.json
  16. 1 0
      custom_components/tuya_local/translations/no-NB.json
  17. 1 0
      custom_components/tuya_local/translations/pl.json
  18. 1 0
      custom_components/tuya_local/translations/pt-BR.json
  19. 1 0
      custom_components/tuya_local/translations/pt-PT.json
  20. 1 0
      custom_components/tuya_local/translations/ro.json
  21. 1 0
      custom_components/tuya_local/translations/ru.json
  22. 1 0
      custom_components/tuya_local/translations/sv.json
  23. 1 0
      custom_components/tuya_local/translations/uk.json
  24. 1 0
      custom_components/tuya_local/translations/ur.json
  25. 1 0
      custom_components/tuya_local/translations/zh-Hans.json
  26. 1 0
      custom_components/tuya_local/translations/zh-Hant.json

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1245,3 +1245,4 @@ Further device support has been made with the assistance of users. Please consid
 - [er2er](https://github.com/er2er) for contributing support for Klarstein WonderSky IR heater.
 - [evanjd](https://github.com/evanjd) for contributing support for Breville Smart Air Viral Protect Night Glow air purifier.
 - [trixing](https://github.com/trixing) for contributing support for PV28-AW CO2 monitor.
+- [hofvanta](https://github.com/hofvanta) for assisting with support for PNI CT45 thermostat.

+ 1 - 0
DEVICES.md

@@ -270,6 +270,7 @@ devices # Supported
 - Owon PCT513 thermostat
 - Pilot Wire RP5 bath thermostat
 - Plikc Neve X W/RFW and Neve Pro W thermostats
+- PNI CT45 thermostat
 - Polytherm Polyalpha thermostat
 - Psmart T436 thermostat
 - RYRA TYTE-D1 thermostat with energy monitoring

+ 572 - 0
custom_components/tuya_local/devices/pni_ct45_thermostat.yaml

@@ -0,0 +1,572 @@
+name: Thermostat
+products:
+  - id: ono8zmpmwfbm06ke
+    manufacturer: PNI
+    model: CT45
+entities:
+  - entity: climate
+    translation_key: thermostat
+    dps:
+      - id: 1
+        type: boolean
+        optional: true
+        name: hvac_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: heat
+      - id: 2
+        type: string
+        optional: true
+        name: available
+        mapping:
+          - dps_val: hotwater
+            value: false
+          - value: true
+      - id: 3
+        type: string
+        optional: true
+        name: hvac_action
+        mapping:
+          - dps_val: heating
+            value: heating
+          - dps_val: holiday_heating
+            value: heating
+          - dps_val: frost_heating
+            value: defrosting
+          - value: idle
+      - id: 4
+        type: boolean
+        optional: true
+        name: preset_mode
+        mapping:
+          - dps_val: false
+            value: comfort
+          - dps_val: true
+            value: eco
+      - id: 16
+        type: integer
+        optional: true
+        name: temperature
+        unit: C
+        range:
+          min: 50
+          max: 400
+        mapping:
+          - scale: 10
+            step: 5
+      - id: 19
+        type: integer
+        optional: true
+        name: max_temperature
+      - id: 24
+        type: integer
+        optional: true
+        name: current_temperature
+        mapping:
+          - scale: 10
+      - id: 26
+        type: integer
+        optional: true
+        name: min_temperature
+      - id: 34
+        type: integer
+        optional: true
+        name: current_humidity
+      - id: 64
+        type: string
+        optional: true
+        name: fan_mode
+        mapping:
+          - dps_val: auto
+            value: auto
+          - dps_val: "on"
+            value: "on"
+          - dps_val: circulation
+            value: cycle
+  - entity: water_heater
+    dps:
+      - id: 1
+        type: boolean
+        optional: true
+        name: operating_mode
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: heat_pump
+      - id: 2
+        type: string
+        optional: true
+        name: available
+        mapping:
+          - dps_val: hotwater
+            value: true
+          - value: false
+      - id: 16
+        type: integer
+        optional: true
+        name: temperature
+        unit: C
+        range:
+          min: 50
+          max: 400
+        mapping:
+          - scale: 10
+            step: 5
+      - id: 19
+        type: integer
+        optional: true
+        name: max_temperature
+      - id: 24
+        type: integer
+        optional: true
+        name: current_temperature
+        mapping:
+          - scale: 10
+      - id: 26
+        type: integer
+        optional: true
+        name: min_temperature
+  - entity: select
+    translation_key: mode
+    category: config
+    dps:
+      - id: 2
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: heat
+            value: Heating
+          - dps_val: hotwater
+            value: Hot water
+  - entity: light
+    translation_key: display
+    category: config
+    dps:
+      - id: 6
+        type: boolean
+        optional: true
+        name: switch
+  - entity: valve
+    dps:
+      - id: 7
+        type: boolean
+        optional: true
+        name: valve
+  - entity: switch
+    name: Schedule
+    category: config
+    dps:
+      - id: 8
+        type: boolean
+        optional: true
+        name: switch
+  - entity: switch
+    translation_key: anti_frost
+    category: config
+    dps:
+      - id: 10
+        type: boolean
+        optional: true
+        name: switch
+  - entity: select
+    translation_key: menu
+    category: config
+    dps:
+      - id: 14
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: Default
+            value: Default
+          - dps_val: Circle
+            value: Circle
+          - dps_val: "2"
+            value: Screen 2
+          - dps_val: "3"
+            value: Screen 3
+          - dps_val: "4"
+            value: Screen 4
+          - dps_val: "5"
+            value: Screen 5
+          - dps_val: "6"
+            value: Screen 6
+          - dps_val: DevPIN
+            value: PIN entry
+  - entity: number
+    name: Home temperature
+    class: temperature
+    category: config
+    dps:
+      - id: 18
+        type: integer
+        optional: true
+        name: value
+        unit: C
+        range:
+          min: 50
+          max: 400
+        mapping:
+          - scale: 10
+            step: 5
+  - entity: number
+    name: Away temperature
+    class: temperature
+    category: config
+    dps:
+      - id: 20
+        type: integer
+        optional: true
+        name: value
+        unit: C
+        range:
+          min: 50
+          max: 400
+        mapping:
+          - scale: 10
+            step: 5
+  - entity: number
+    translation_key: maximum_temperature
+    class: temperature
+    category: config
+    dps:
+      - id: 19
+        type: integer
+        optional: true
+        name: value
+        unit: C
+        range:
+          min: 5
+          max: 35
+  - entity: number
+    translation_key: minimum_temperature
+    class: temperature
+    category: config
+    dps:
+      - id: 26
+        type: integer
+        optional: true
+        name: value
+        unit: C
+        range:
+          min: 5
+          max: 35
+  - entity: number
+    name: Anti-freeze temperature
+    category: config
+    dps:
+      - id: 27
+        type: integer
+        optional: true
+        name: value
+        unit: °
+        range:
+          min: 0
+          max: 400
+  - entity: light
+    translation_key: display
+    dps:
+      - id: 28
+        name: brightness
+        type: string
+        optional: true
+        mapping:
+          - dps_val: low
+            value: 85
+          - dps_val: middle
+            value: 170
+          - dps_val: high
+            value: 255
+  - entity: switch
+    name: Override
+    category: config
+    dps:
+      - id: 40
+        type: boolean
+        optional: true
+        name: switch
+  - entity: select
+    translation_key: mode
+    dps:
+      - id: 41
+        type: string
+        name: option
+        optional: true
+        mapping:
+          - dps_val: program
+            value: schedule
+          - dps_val: manual
+            value: manual
+          - dps_val: boost
+            value: high
+  - entity: sensor
+    translation_key: time_remaining
+    class: duration
+    category: diagnostic
+    dps:
+      - id: 42
+        type: integer
+        optional: true
+        name: sensor
+        unit: min
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 45
+        type: bitfield
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - dps_val: null
+            value: false
+          - value: true
+      - id: 45
+        type: bitfield
+        optional: true
+        name: fault_code
+  - entity: select
+    name: Display timeout
+    translation_key: timer
+    category: config
+    dps:
+      - id: 52
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: "20s"
+            value: "20s"
+          - dps_val: "1minute"
+            value: "1m"
+          - dps_val: "3minutes"
+            value: "3m"
+  - entity: number
+    name: Running duration
+    category: config
+    translation_key: timer
+    dps:
+      - id: 56
+        type: integer
+        optional: true
+        name: value
+        unit: min
+        range:
+          min: 15
+          max: 180
+  - entity: switch
+    name: Alarm
+    icon: "mdi:bell"
+    category: config
+    dps:
+      - id: 101
+        type: boolean
+        optional: true
+        name: switch
+  - entity: number
+    name: Child lock
+    category: config
+    icon: "mdi:dialpad"
+    dps:
+      - id: 102
+        type: integer
+        optional: true
+        name: value
+        range:
+          min: 0
+          max: 9999
+  - entity: sensor
+    name: External temperature 1
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 103
+        type: base64
+        optional: true
+        mask: "0000000000000000FFFF"
+        name: sensor
+        unit: C
+        class: measurement
+        mapping:
+          - scale: 10
+      - id: 103
+        type: base64
+        optional: true
+        # first 8 bytes is "name", but our mask only gives a numeric result
+        name: raw
+  - entity: sensor
+    name: External temperature 2
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 104
+        type: base64
+        optional: true
+        mask: "0000000000000000FFFF"
+        name: sensor
+        unit: C
+        class: measurement
+        mapping:
+          - scale: 10
+      - id: 104
+        type: base64
+        optional: true
+        name: raw
+  - entity: sensor
+    name: External temperature 3
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 105
+        type: base64
+        optional: true
+        mask: "0000000000000000FFFF"
+        name: sensor
+        unit: C
+        class: measurement
+        mapping:
+          - scale: 10
+      - id: 105
+        type: base64
+        optional: true
+        name: raw
+  - entity: sensor
+    name: Average temperature
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 107
+        type: integer
+        name: sensor
+        unit: C
+        mapping:
+          - scale: 10
+      - id: 108
+        type: integer
+        optional: true
+        name: heating
+      - id: 109
+        type: integer
+        optional: true
+        name: cooling
+  - entity: sensor
+    name: Heating per hour
+    class: duration
+    category: diagnostic
+    dps:
+      - id: 110
+        type: integer
+        optional: true
+        name: sensor
+        unit: min
+  - entity: sensor
+    name: Cooling per hour
+    class: duration
+    category: diagnostic
+    dps:
+      - id: 111
+        type: integer
+        optional: true
+        name: sensor
+        unit: min
+  - entity: sensor
+    name: Hot water per hour
+    class: duration
+    category: diagnostic
+    dps:
+      - id: 112
+        type: integer
+        optional: true
+        name: sensor
+        unit: min
+  - entity: text
+    name: Heating schedule
+    category: config
+    icon: "mdi:fire"
+    hidden: true
+    dps:
+      - id: 114
+        type: base64
+        optional: true
+        name: value
+  - entity: text
+    name: Hot water schedule
+    category: config
+    icon: "mdi:water-boiler"
+    hidden: true
+    dps:
+      - id: 115
+        type: base64
+        optional: true
+        name: value
+  - entity: text
+    name: Vacation schedule
+    category: config
+    icon: "mdi:island"
+    hidden: true
+    dps:
+      - id: 116
+        type: base64
+        optional: true
+        name: value
+  - entity: datetime
+    category: config
+    dps:
+      - id: 118
+        type: base64
+        optional: true
+        mask: "FF000000000000"
+        name: year
+        range:
+          min: 0
+          max: 99
+        mapping:
+          - target_range:
+              min: 2000
+              max: 2099
+      - id: 118
+        type: base64
+        optional: true
+        mask: "00FF0000000000"
+        name: month
+      - id: 118
+        type: base64
+        optional: true
+        mask: "0000FF00000000"
+        name: day
+      - id: 118
+        type: base64
+        optional: true
+        mask: "000000FF000000"
+        name: hour
+      - id: 118
+        type: base64
+        optional: true
+        mask: "00000000FF0000"
+        name: minute
+      - id: 118
+        type: base64
+        optional: true
+        mask: "0000000000FF00"
+        name: second
+      - id: 118
+        type: base64
+        optional: true
+        mask: "000000000000FF"
+        name: ampm24
+  - entity: text
+    name: Open window settings
+    category: config
+    icon: "mdi:window-open-variant"
+    hidden: true
+    dps:
+      - id: 119
+        type: base64
+        optional: true
+        name: value

+ 1 - 0
custom_components/tuya_local/translations/bg.json

@@ -634,6 +634,7 @@
                     "45s": "45 секунди",
                     "1m": "1 минута",
                     "2m": "2 минути",
+                    "3m": "3 минути",
                     "5m": "5 минути",
                     "10m": "10 минути",
                     "15m": "15 минути",

+ 1 - 0
custom_components/tuya_local/translations/ca.json

@@ -794,6 +794,7 @@
                     "45s": "45 segons",
                     "1m": "1 minut",
                     "2m": "2 minuts",
+                    "3m": "3 minuts",
                     "5m": "5 minuts",
                     "10m": "10 minuts",
                     "15m": "15 minuts",

+ 1 - 0
custom_components/tuya_local/translations/cz.json

@@ -634,6 +634,7 @@
                     "45s": "45 sekund",
                     "1m": "1 minuta",
                     "2m": "2 minuty",
+                    "3m": "3 minuty",
                     "5m": "5 minut",
                     "10m": "10 minut",
                     "15m": "15 minut",

+ 1 - 0
custom_components/tuya_local/translations/de.json

@@ -634,6 +634,7 @@
                     "45s": "45 Sekunden",
                     "1m": "1 Minute",
                     "2m": "2 Minuten",
+                    "3m": "3 Minuten",
                     "5m": "5 Minuten",
                     "10m": "10 Minuten",
                     "15m": "15 Minuten",

+ 1 - 0
custom_components/tuya_local/translations/el.json

@@ -634,6 +634,7 @@
                     "45s": "45 δευτερόλεπτα",
                     "1m": "1 λεπτό",
                     "2m": "2 λεπτά",
+                    "3m": "3 λεπτά",
                     "5m": "5 λεπτά",
                     "10m": "10 λεπτά",
                     "15m": "15 λεπτά",

+ 1 - 0
custom_components/tuya_local/translations/en.json

@@ -634,6 +634,7 @@
                     "45s": "45 seconds",
                     "1m": "1 minute",
                     "2m": "2 minutes",
+                    "3m": "3 minutes",
                     "5m": "5 minutes",
                     "10m": "10 minutes",
                     "15m": "15 minutes",

+ 1 - 0
custom_components/tuya_local/translations/es.json

@@ -634,6 +634,7 @@
                     "45s": "45 segundos",
                     "1m": "1 minuto",
                     "2m": "2 minutos",
+                    "3m": "3 minutos",
                     "5m": "5 minutos",
                     "10m": "10 minutos",
                     "15m": "15 minutos",

+ 1 - 0
custom_components/tuya_local/translations/fr.json

@@ -634,6 +634,7 @@
                     "45s": "45 secondes",
                     "1m": "1 minute",
                     "2m": "2 minutes",
+                    "3m": "3 minutes",
                     "5m": "5 minutes",
                     "10m": "10 minutes",
                     "15m": "15 minutes",

+ 1 - 0
custom_components/tuya_local/translations/hu.json

@@ -635,6 +635,7 @@
                     "45s": "45 másodperc",
                     "1m": "1 perc",
                     "2m": "2 perc",
+                    "3m": "3 perc",
                     "5m": "5 perc",
                     "10m": "10 perc",
                     "15m": "15 perc",

+ 1 - 0
custom_components/tuya_local/translations/id.json

@@ -634,6 +634,7 @@
                     "45s": "45 detik",
                     "1m": "1 menit",
                     "2m": "2 menit",
+                    "3m": "3 menit",
                     "5m": "5 menit",
                     "10m": "10 menit",
                     "15m": "15 menit",

+ 1 - 0
custom_components/tuya_local/translations/it.json

@@ -635,6 +635,7 @@
                     "45s": "45 secondi",
                     "1m": "1 minuto",
                     "2m": "2 minuti",
+                    "3m": "3 minuti",
                     "5m": "5 minuti",
                     "10m": "10 minuti",
                     "15m": "15 minuti",

+ 1 - 0
custom_components/tuya_local/translations/ja.json

@@ -634,6 +634,7 @@
                     "45s": "45秒",
                     "1m": "1分",
                     "2m": "2分",
+                    "3m": "3分",
                     "5m": "5分",
                     "10m": "10分",
                     "15m": "15分",

+ 1 - 0
custom_components/tuya_local/translations/no-NB.json

@@ -635,6 +635,7 @@
                     "45s": "45 sekunder",
                     "1m": "1 minutt",
                     "2m": "2 minutter",
+                    "3m": "3 minutter",
                     "5m": "5 minutter",
                     "10m": "10 minutter",
                     "15m": "15 minutter",

+ 1 - 0
custom_components/tuya_local/translations/pl.json

@@ -634,6 +634,7 @@
                     "45s": "45 sekund",
                     "1m": "1 minuta",
                     "2m": "2 minuty",
+                    "3m": "3 minuty",
                     "5m": "5 minut",
                     "10m": "10 minut",
                     "15m": "15 minut",

+ 1 - 0
custom_components/tuya_local/translations/pt-BR.json

@@ -634,6 +634,7 @@
                     "45s": "45 segundos",
                     "1m": "1 minuto",
                     "2m": "2 minutos",
+                    "3m": "3 minutos",
                     "5m": "5 minutos",
                     "10m": "10 minutos",
                     "15m": "15 minutos",

+ 1 - 0
custom_components/tuya_local/translations/pt-PT.json

@@ -634,6 +634,7 @@
                     "45s": "45 segundos",
                     "1m": "1 minuto",
                     "2m": "2 minutos",
+                    "3m": "3 minutos",
                     "5m": "5 minutos",
                     "10m": "10 minutos",
                     "15m": "15 minutos",

+ 1 - 0
custom_components/tuya_local/translations/ro.json

@@ -634,6 +634,7 @@
                     "45s": "45 secunde",
                     "1m": "1 minut",
                     "2m": "2 minute",
+                    "3m": "3 minute",
                     "5m": "5 minute",
                     "10m": "10 minute",
                     "15m": "15 minute",

+ 1 - 0
custom_components/tuya_local/translations/ru.json

@@ -634,6 +634,7 @@
                     "45s": "45 секунд",
                     "1m": "1 минута",
                     "2m": "2 минуты",
+                    "3m": "3 минуты",
                     "5m": "5 минут",
                     "10m": "10 минут",
                     "15m": "15 минут",

+ 1 - 0
custom_components/tuya_local/translations/sv.json

@@ -634,6 +634,7 @@
                     "45s": "45 sekunder",
                     "1m": "1 minut",
                     "2m": "2 minuter",
+                    "3m": "3 minuter",
                     "5m": "5 minuter",
                     "10m": "10 minuter",
                     "15m": "15 minuter",

+ 1 - 0
custom_components/tuya_local/translations/uk.json

@@ -635,6 +635,7 @@
                     "45s": "45 секунд",
                     "1m": "1 хвилина",
                     "2m": "2 хвилини",
+                    "3m": "3 хвилини",
                     "5m": "5 хвилин",
                     "10m": "10 хвилин",
                     "15m": "15 хвилин",

+ 1 - 0
custom_components/tuya_local/translations/ur.json

@@ -637,6 +637,7 @@
                     "45s": "45 سیکنڈ",
                     "1m": "1 منٹ",
                     "2m": "2 منٹ",
+                    "3m": "3 منٹ",
                     "5m": "5 منٹ",
                     "10m": "10 منٹ",
                     "15m": "15 منٹ",

+ 1 - 0
custom_components/tuya_local/translations/zh-Hans.json

@@ -634,6 +634,7 @@
                     "45s": "45秒",
                     "1m": "1分钟",
                     "2m": "2分钟",
+                    "3m": "3分钟",
                     "5m": "5分钟",
                     "10m": "10分钟",
                     "15m": "15分钟",

+ 1 - 0
custom_components/tuya_local/translations/zh-Hant.json

@@ -635,6 +635,7 @@
                     "45s": "45秒",
                     "1m": "1分鐘",
                     "2m": "2分鐘",
+                    "3m": "3分鐘",
                     "5m": "5分鐘",
                     "10m": "10分鐘",
                     "15m": "15分鐘",