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

Add Fakro ARZ Wi-Fi roof blind (#5503)

* Add Fakro ARZ Wi-Fi roof blind

* Drop entity names that duplicate device class translations

Moving/Voltage/Current inherit their name from the device class, so an
explicit name equal to the class hid the class translation (CI check
untranslated_entities).

* fix (fakro_arz_roofblind): rename and minor updates

- Removed the 'Service flag' binary sensor entity and added 'service_flag' attibute to the cover entity.
- Removed name override that was the same as the top level name
- renamed file to follow the brand_model_devicetype convention

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Piotr Romanowski 3 дней назад
Родитель
Сommit
1f378be427
1 измененных файлов с 147 добавлено и 0 удалено
  1. 147 0
      custom_components/tuya_local/devices/fakro_arz_roofblind.yaml

+ 147 - 0
custom_components/tuya_local/devices/fakro_arz_roofblind.yaml

@@ -0,0 +1,147 @@
+name: Roof blind
+products:
+  - id: wj3t8r1dguccdryj
+    manufacturer: Fakro
+    model: ARZ Wi-Fi
+entities:
+  # Only "position" (dp 2) is required for matching; everything else is
+  # optional: true, because the device does not report all DPs in the first
+  # packet during setup. Optional DPs never block a match and improve match
+  # quality once they arrive.
+  - entity: cover
+    class: blind
+    dps:
+      - id: 1
+        type: string
+        name: control
+        optional: true
+        mapping:
+          - dps_val: open
+            value: open
+          - dps_val: stop
+            value: stop
+          - dps_val: close
+            value: close
+      - id: 2
+        type: integer
+        name: position
+        range:
+          min: 0
+          max: 100
+      - id: 2
+        type: integer
+        name: current_position
+        range:
+          min: 0
+          max: 100
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 12
+        type: bitfield
+        name: sensor
+        optional: true
+        mapping:
+          - dps_val: 0
+            value: false
+          - dps_val: null
+            value: false
+          - value: true
+      - id: 12
+        type: bitfield
+        name: fault_code
+        optional: true
+      - id: 103
+        type: boolean
+        name: service_flag
+        optional: true
+  - entity: binary_sensor
+    class: moving
+    category: diagnostic
+    dps:
+      - id: 106
+        type: integer
+        name: sensor
+        optional: true
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+  - entity: sensor
+    class: voltage
+    category: diagnostic
+    dps:
+      # dp 105 is documented with a scale of 10 (deci-volts). In practice this
+      # device always reports 0 here, but the scale is kept per the spec.
+      - id: 105
+        type: integer
+        name: sensor
+        optional: true
+        unit: V
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: current
+    category: diagnostic
+    dps:
+      - id: 181
+        type: integer
+        name: sensor
+        optional: true
+        unit: mA
+        class: measurement
+        range:
+          min: 0
+          max: 2500
+  - entity: sensor
+    name: Open load
+    class: current
+    category: diagnostic
+    dps:
+      - id: 101
+        type: integer
+        name: sensor
+        optional: true
+        unit: mA
+        class: measurement
+        range:
+          min: 0
+          max: 2000
+  - entity: sensor
+    name: Close load
+    class: current
+    category: diagnostic
+    dps:
+      - id: 102
+        type: integer
+        name: sensor
+        optional: true
+        unit: mA
+        class: measurement
+        range:
+          min: 0
+          max: 1800
+  - entity: number
+    name: Comfort position
+    category: config
+    icon: "mdi:sun-thermometer-outline"
+    dps:
+      - id: 113
+        type: integer
+        name: value
+        optional: true
+        unit: "%"
+        range:
+          min: 0
+          max: 100
+  - entity: switch
+    name: Comfort mode
+    category: config
+    icon: "mdi:weather-sunny"
+    dps:
+      - id: 104
+        type: boolean
+        name: switch
+        optional: true