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

Update tompd_63lw_breaker.yaml - A way to fix polling problems

My device always stopped updating in Home Assistant after about a minute or so, oddly, when I would have opened the app, it would start polling data again.

I snooped around Query Properties on API Explorer and I found this:

      {
        "code": "refresh",
        "custom_name": "",
        "dp_id": 106,
        "time": 1702153606980,
        "value": false
      }

Apparently this command corresponds to the command "刷新上报" (Refresh report) which you can see on Tuya IoT Platform - *Project* - Device Debugging - Device Report under the same category with the Mandarin name. Apparently the mobile app sends this command when you access the device. I tested this myself, made an automation to press this button every 30 seconds and I haven't encountered any problems since.
DevilRange 2 лет назад
Родитель
Сommit
d59b08ba40
1 измененных файлов с 9 добавлено и 0 удалено
  1. 9 0
      custom_components/tuya_local/devices/tompd_63lw_breaker.yaml

+ 9 - 0
custom_components/tuya_local/devices/tompd_63lw_breaker.yaml

@@ -51,6 +51,15 @@ secondary_entities:
         type: boolean
         name: button
         optional: true
+  - entity: button
+    name: Refresh report
+    class: restart
+    category: config
+    dps:
+      - id: 106
+        type: boolean
+        name: button
+        optional: true
   - entity: sensor
     name: Balance energy
     category: diagnostic