Ver Fonte

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 há 1 ano atrás
pai
commit
373769a59e

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

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