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

Add support for Emax EM3378 weather station (Hiper P1)

Issue #419
Jason Rumney 3 лет назад
Родитель
Сommit
660e66690a
3 измененных файлов с 216 добавлено и 0 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 214 0
      custom_components/tuya_local/devices/em3378_weather_station.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -187,3 +187,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [Clam58](https://github.com/Clam58) for contributing support for Ebac DJ4000 dehumidifierss.
 - [rafazundt](https://github.com/rafazundt) for assisting with support for AOFO ZLD and other 4-way+USB powerstrips, and iH001 LED controllers.
 - [robertvanroosmal](https://github.com/robertvanroosmal) for assisting with support for Abalon smart curtains.
+- [garry0garry](https://github.com/garry0garry) for assisting with support for Emax EM3378 weather station.

+ 1 - 0
DEVICES.md

@@ -271,6 +271,7 @@ generic configurations known to work with multiple brands of device.
 - Bresser smart 7-in-1 weather station
 - Catit Pixi smart fountain
 - Catit pet feeder (experimental)
+- Emax EM3378 Weather Station (selling as Hiper P1 and other rebrands)
 - Konlen/Rockson WF96L water level controller
 - Nedis pet feeder
 - Nedis WIFISA10CWT air quality monitor

+ 214 - 0
custom_components/tuya_local/devices/em3378_weather_station.yaml

@@ -0,0 +1,214 @@
+name: Weather Station
+product:
+  - id: q9opgtca8ymbxpqn
+    name: EM3378
+primary_entity:
+  entity: sensor
+  name: Indoor temperature
+  class: temperature
+  dps:
+    - id: 101
+      type: integer
+      name: sensor
+      class: measurement
+      mapping:
+        - scale: 10
+    - id: 112
+      type: boolean
+      name: unit
+      mapping:
+        - dps_val: false
+          value: C
+        - dps_val: true
+          value: F
+    - id: 117
+      name: fault
+      type: bitfield
+      optional: true
+      # we need to know the full range of values to expose this as a light control
+    - id: 118
+      name: backlight_brightness
+      type: string
+    - id: 121
+      name: backlight_leading_time
+      type: integer
+      # below is probably related to the built in USB charger, but is encoded
+    - id: 122
+      name: output_power
+      type: hex
+secondary_entities:
+  - entity: sensor
+    name: Indoor humidity
+    class: humidity
+    dps:
+      - id: 102
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+  - entity: sensor
+    name: Remote temperature 1
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 103
+        type: integer
+        name: sensor
+        class: measurement
+        mapping:
+          - scale: 10
+      - id: 112
+        type: boolean
+        name: unit
+        mapping:
+          - dps_val: false
+            value: C
+          - dps_val: true
+            value: F
+  - entity: sensor
+    name: Remote humidity 1
+    class: humidity
+    category: diagnostic
+    dps:
+      - id: 104
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+  - entity: sensor
+    name: Remote temperature 2
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 106
+        type: integer
+        name: sensor
+        class: measurement
+        optional: true
+        mapping:
+          - scale: 10
+      - id: 112
+        type: boolean
+        name: unit
+        mapping:
+          - dps_val: false
+            value: C
+          - dps_val: true
+            value: F
+  - entity: sensor
+    name: Remote humidity 2
+    class: humidity
+    category: diagnostic
+    dps:
+      - id: 107
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+        optional: true
+  - entity: sensor
+    name: Remote temperature 3
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 108
+        type: integer
+        name: sensor
+        class: measurement
+        optional: true
+        mapping:
+          - scale: 10
+      - id: 112
+        type: boolean
+        name: unit
+        mapping:
+          - dps_val: false
+            value: C
+          - dps_val: true
+            value: F
+  - entity: sensor
+    name: Remote humidity 3
+    class: humidity
+    category: diagnostic
+    dps:
+      - id: 109
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+        optional: true
+  - entity: sensor
+    name: Atmospheric pressure
+    class: atmospheric_pressure
+    category: diagnostic
+    dps:
+      - id: 110 
+        type: integer
+        name: sensor
+        class: measurement
+      - id: 111
+        type: string
+        name: unit
+  - entity: select
+    name: Atmospheric pressure unit
+    icon: "mdi:gauge"
+    category: config
+    dps:
+      - id: 111
+        type: string
+        name: option
+        mapping:
+          - dps_val: mmHg
+            value: mm of mercury
+          - dps_val: hPa
+            value: millibars
+          - dps_val: inHg
+            value: inches of mercury
+  - entity: select
+    name: Temperature unit
+    icon: "mdi:temperature-celsius"
+    category: config
+    dps:
+      - id: 112
+        type: string
+        name: option
+        mapping:
+          - dps_val: false
+            value: Celsius
+          - dps_val: true
+            value: Fahrenheit
+  - entity: binary_sensor
+    name: Fault
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 117
+        type: boolean
+        name: sensor
+        optional: true
+        mapping:
+          - dps_val: null
+            value: false
+          - dps_val: 0
+            value: false
+          - value: true
+  - entity: select
+    name: Time mode
+    icon: "mdi:clock-edit"
+    category: config
+    dps:
+      - id: 119
+        type: string
+        name: option
+        mapping:
+          - dps_val: true 
+            value: 24h
+          - dps_val: false
+            value: 12h
+  - entity: switch
+    name: Date
+    category: config
+    dps:
+      - id: 1
+        type: boolean
+        name: switch