Explorar o código

Add support for GHome ceiling fan and light switch

Issue #2466
Jason Rumney hai 1 ano
pai
achega
667692530c

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -743,3 +743,4 @@ Further device support has been made with the assistance of users. Please consid
 - [Tbaile](https://github.com/Tbaile) for contributing support for Plikc Neve Pro W thermostat.
 - [r08ertliu](https://github.com/r08ertliu) for contributing support for New Widetech WPF-15SW5 fan.
 - [banjohb](https://github.com/banjohb) for assisting with support for Curry Smarter 6-Gen roller shutter switch.
+- [KyleStilkey](https://github.com/KyleStilkey) for assisting with support for GHome SW19 fan and light switch.

+ 1 - 0
DEVICES.md

@@ -245,6 +245,7 @@
 - eLinkSmart KH-SY2626 pedestal fan
 - Fanco Eco Silent Deluxe ceiling fan with LED light
 - FlinQ Breeze indoor pedestal fan
+- GHome SW19 ceiling fan and light switch
 - Goldair GCPF315 fan
 - Goldair Platinum tower fan (2 variants)
 - Hiper T3 bladeless fan

+ 111 - 0
custom_components/tuya_local/devices/ghome_sw19_fanlight.yaml

@@ -0,0 +1,111 @@
+name: Fan and light switch
+products:
+  - id: j11gop7l2l3sblc2
+    name: GHome SW19
+primary_entity:
+  entity: fan
+  dps:
+    - id: 1
+      type: boolean
+      name: switch
+    - id: 3
+      type: string
+      name: speed
+      mapping:
+        - dps_val: level_1
+          value: 25
+        - dps_val: level_2
+          value: 50
+        - dps_val: level_3
+          value: 75
+        - dps_val: level_4
+          value: 100
+secondary_entities:
+  - entity: number
+    name: Fan timer
+    category: config
+    translation_key: timer
+    dps:
+      - id: 2
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: light
+    dps:
+      - id: 5
+        type: boolean
+        name: switch
+      - id: 6
+        name: brightness
+        type: integer
+        range:
+          min: 10
+          max: 1000
+  - entity: number
+    name: Light timer
+    category: config
+    translation_key: timer
+    dps:
+      - id: 7
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: select
+    translation_key: initial_state
+    category: config
+    dps:
+      - id: 11
+        type: string
+        name: option
+        mapping:
+          - dps_val: "off"
+            value: "off"
+          - dps_val: "on"
+            value: "on"
+          - dps_val: memory
+            value: memory
+  - entity: select
+    name: Backlight
+    icon: "mdi:circle-double"
+    category: config
+    dps:
+      - id: 12
+        type: string
+        name: option
+        mapping:
+          - dps_val: none
+            value: "off"
+          - dps_val: relay
+            value: state
+          - dps_val: pos
+            value: position
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 101
+        type: bitfield
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - dps_val: null
+            value: false
+          - value: true
+      - id: 101
+        type: bitfield
+        optional: true
+        name: fault_code