瀏覽代碼

fix(afyeev_16a_evcharger): expose online/offline state as refresh button

After initially assuming that this was a sensor, it has been found on other devices
that this can be used to set the device into high refresh rate for a period.

Issue #4781
Jason Rumney 2 月之前
父節點
當前提交
abb18cdee0
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. 14 0
      custom_components/tuya_local/devices/afyeev_16a_evcharger.yaml

+ 14 - 0
custom_components/tuya_local/devices/afyeev_16a_evcharger.yaml

@@ -259,6 +259,7 @@ entities:
           - scale: 100
           - scale: 100
   - entity: binary_sensor
   - entity: binary_sensor
     class: connectivity
     class: connectivity
+    deprecated: button.refresh  # 2026-04-19
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 27
       - id: 27
@@ -270,6 +271,19 @@ entities:
             value: false
             value: false
           - dps_val: online
           - dps_val: online
             value: true
             value: true
+  - entity: button
+    name: Refresh
+    icon: "mdi:refresh"
+    category: config
+    dps:
+      - id: 27
+        type: string
+        optional: true
+        name: button
+        mapping:
+          - dps_val: online
+            value: true
+          - value: false
   - entity: number
   - entity: number
     translation_key: timer
     translation_key: timer
     class: duration
     class: duration