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

Add garage door opener with light (#4852)

* Add garage door opener with light device config

Adds support for Tuya garage door openers that include a light entity.

DPS mapping (confirmed via live device testing):
- 101 (string): control command - open/close/stop
- 102 (integer 0-100): current position percentage
- 105 (boolean): light switch
- 107 (string): door state - opened/opening/closed/closing

* Update garage_door_with_light: add position control and partial_opening state

- DPS 102 supports position targeting (confirmed: door stops at requested %)
- Add position (settable) alongside current_position (readable)
- Map partial_opening state (reported when door stopped mid-travel)

* Fix partial_opening mapped to null per review feedback

* feat(aosdk_garagedoorwithlight): rename file

- this is not following standard tuya cover dps, so it should not misleadingly use a generic filename.

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Terry Rankine 1 месяц назад
Родитель
Сommit
d62d813dbd
1 измененных файлов с 43 добавлено и 0 удалено
  1. 43 0
      custom_components/tuya_local/devices/aosd_garagedoorwithlight.yaml

+ 43 - 0
custom_components/tuya_local/devices/aosd_garagedoorwithlight.yaml

@@ -0,0 +1,43 @@
+name: Garage door with light
+entities:
+  - entity: cover
+    class: garage
+    dps:
+      - id: 101
+        type: string
+        name: control
+        mapping:
+          - dps_val: open
+            value: open
+          - dps_val: close
+            value: close
+          - dps_val: stop
+            value: stop
+      - id: 102
+        type: integer
+        name: position
+        range:
+          min: 0
+          max: 100
+      - id: 102
+        type: integer
+        name: current_position
+      - id: 107
+        type: string
+        name: action
+        mapping:
+          - dps_val: opened
+            value: open
+          - dps_val: closed
+            value: closed
+          - dps_val: opening
+            value: opening
+          - dps_val: closing
+            value: closing
+          - dps_val: partial_opening
+
+  - entity: light
+    dps:
+      - id: 105
+        type: boolean
+        name: switch