Quellcode durchsuchen

Smartplugv2 energy: add alt overcharge switch for Smartrul/Beston

Compatible Beston BSD01, with same product id as existing Smartrul model
has inching and overcharge not matched by this config. Inching is anyway
not supported, so not important, but overcharge should be adjusted to match.

Issue #2854
Jason Rumney vor 1 Jahr
Ursprung
Commit
373769a59e
1 geänderte Dateien mit 13 neuen und 4 gelöschten Zeilen
  1. 13 4
      custom_components/tuya_local/devices/smartplugv2_energy.yaml

+ 13 - 4
custom_components/tuya_local/devices/smartplugv2_energy.yaml

@@ -13,8 +13,8 @@ products:
     manufacturer: SWE SAGEWE
     model: F2s501-GB
   - id: uqehhcrmk5depvtl
-    manufacturer: Smatrul
-    model: 16A/20A
+    manufacturer: Smatrul / Beston
+    model: 16A/20A / BDS01
 entities:
   - entity: switch
     class: outlet
@@ -160,7 +160,11 @@ entities:
         name: available
         mapping:
           - dps_val: null
-            value: false
+            value: true
+            constraint: alt_switch
+            conditions:
+              - dps_val: null
+                value: false
           - value: true
       - id: 46
         type: boolean
@@ -168,7 +172,12 @@ entities:
         optional: true
         mapping:
           - dps_val: null
-            invalid: true
+            value_redirect: alt_switch
+      - id: 51
+        type: boolean
+        name: alt_switch
+        optional: true
+        hidden: true
   - entity: select
     name: Light
     icon: "mdi:circle-double"