Преглед изворни кода

Linkoze button: add battery level dp

- Speculatively change "press" to "long_press"

Since there has been no feedback on #774, the actual value for long press is
not known, but we do know that "click" in iot.tuya.com is actually
"single_click" from the logs, and we also know from user feedback that "press"
does not work.
Jason Rumney пре 2 година
родитељ
комит
ff81ef7119
1 измењених фајлова са 11 додато и 2 уклоњено
  1. 11 2
      custom_components/tuya_local/devices/linkoze_dual_button.yaml

+ 11 - 2
custom_components/tuya_local/devices/linkoze_dual_button.yaml

@@ -34,7 +34,7 @@ secondary_entities:
         name: sensor
         persist: false
         mapping:
-          - dps_val: press
+          - dps_val: long_press
             value: true
           - value: false
   - entity: binary_sensor
@@ -45,7 +45,7 @@ secondary_entities:
         name: sensor
         persist: false
         mapping:
-          - dps_val: press
+          - dps_val: long_press
             value: true
           - value: false
   - entity: binary_sensor
@@ -70,3 +70,12 @@ secondary_entities:
           - dps_val: double_click
             value: true
           - value: false
+  - entity: sensor
+    name: Battery
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 10
+        type: integer
+        name: sensor
+        unit: "%"