Browse Source

Oscal PowerMax2400Pro (EU) fixes and additions (#5658)

* Oscal PowerMax2400Pro (EU) fixes and additions

* PowerMax2400Pro: added accidentally omitted last line of the config

* PowerMax2400Pro: incorporate suggested changes

* PowerMax2400Pro: time remaining - days as sensor, hours and minutes as attributes

* naming tweaks

Updated names for various configuration entities to follow convention and make names more concise

---------

Co-authored-by: linedot <linedot@linedot.org>
Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
linedot 8 hours ago
parent
commit
4107522a27

+ 126 - 38
custom_components/tuya_local/devices/oscal_powermax2400pro_portablepower.yaml

@@ -47,6 +47,8 @@ entities:
             value: Bright
           - dps_val: sos
             value: Emergency
+          - dps_val: breath
+            value: Pulse
           - dps_val: flash
             value: Flash
   - entity: sensor
@@ -98,15 +100,20 @@ entities:
         type: boolean
         name: switch
   - entity: sensor
-    class: duration
-    name: Generation time
+    translation_key: time_remaining
     category: diagnostic
+    class: duration
     dps:
-      - id: 37
+      - id: 108
         type: integer
         name: sensor
-        unit: h
-        class: measurement
+        unit: d
+      - id: 37
+        type: integer
+        name: hour
+      - id: 127
+        type: integer
+        name: minute
   - entity: switch
     name: Notifications
     category: config
@@ -168,15 +175,6 @@ entities:
         range:
           min: 0
           max: 30
-  - entity: sensor
-    name: Estimated battery life
-    class: duration
-    category: diagnostic
-    dps:
-      - id: 108
-        type: integer
-        name: sensor
-        unit: d
   - entity: select
     name: Display timeout
     icon: "mdi:television-ambient-light"
@@ -206,12 +204,12 @@ entities:
         type: string
         name: sensor
         mapping:
-          - dps_val: "1"
-            value: charging
-          - dps_val: "2"
-            value: discharging
           - dps_val: "0"
+            value: discharging
+          - dps_val: "1"
             value: standby
+          - dps_val: "2"
+            value: charging
   - entity: sensor
     name: AC input
     class: power
@@ -233,13 +231,20 @@ entities:
         unit: W
         class: measurement
   - entity: switch
-    name: Slow charge
+    name: Bluetooth speaker
     category: config
-    icon: "mdi:battery-charging"
+    icon: "mdi:speaker-bluetooth"
     dps:
       - id: 114
         type: boolean
         name: switch
+  - entity: switch
+    name: Grid feed-in
+    category: config
+    dps:
+      - id: 115
+        type: boolean
+        name: switch
   - entity: sensor
     name: DC output
     class: power
@@ -273,6 +278,19 @@ entities:
         range:
           min: 0
           max: 255
+  - entity: number
+    name: Primary feed-in limit
+    category: config
+    dps:
+      - id: 119
+        type: integer
+        name: value
+        unit: W
+        range:
+          min: 50
+          max: 800
+        mapping:
+          - step: 50
   - entity: sensor
     name: Pack 1
     class: battery
@@ -283,10 +301,6 @@ entities:
         name: sensor
         unit: "%"
         class: measurement
-      - id: 119
-        type: integer
-        optional: true
-        name: pack_id
   - entity: sensor
     name: Pack 1 temperature
     class: temperature
@@ -349,29 +363,19 @@ entities:
         name: sensor
         unit: W
         class: measurement
-  - entity: sensor
-    translation_key: time_remaining
-    class: duration
-    category: diagnostic
-    dps:
-      - id: 127
-        type: integer
-        name: sensor
-        unit: min
-        class: measurement
   - entity: number
-    name: Slow charge
+    name: AC charging limit
+    icon: "mdi:battery-charging-90"
     category: config
     class: power
     dps:
       - id: 128
         type: integer
-        optional: true
         name: value
         unit: W
         range:
           min: 100
-          max: 1200
+          max: 1400
         mapping:
           - step: 100
   - entity: sensor
@@ -485,9 +489,10 @@ entities:
         unit: W
         class: measurement
   - entity: select
-    name: AC timer
+    name: AC standby sime
     class: timer
     category: config
+    icon: "mdi:timer-outline"
     dps:
       - id: 139
         type: string
@@ -510,8 +515,10 @@ entities:
           - dps_val: "24hour"
             value: "24h"
   - entity: select
+    name: DC standby time
     class: timer
     category: config
+    icon: "mdi:timer-outline"
     dps:
       - id: 140
         type: string
@@ -533,3 +540,84 @@ entities:
             value: "12h"
           - dps_val: "24hour"
             value: "24h"
+  - entity: time
+    name: Primary feed-in start
+    category: config
+    icon: "mdi:clock-start"
+    dps:
+      - id: 143
+        type: integer
+        name: hour
+        range:
+          min: 0
+          max: 23
+      - id: 144
+        type: integer
+        name: minute
+        range:
+          min: 0
+          max: 59
+  - entity: time
+    name: Primary feed-in end
+    category: config
+    icon: "mdi:clock-end"
+    dps:
+      - id: 145
+        type: integer
+        name: hour
+        range:
+          min: 0
+          max: 23
+      - id: 146
+        type: integer
+        name: minute
+        range:
+          min: 0
+          max: 59
+  - entity: number
+    name: Secondary feed-in limit
+    category: config
+    dps:
+      - id: 147
+        type: integer
+        name: value
+        unit: W
+        range:
+          min: 50
+          max: 800
+        mapping:
+          - step: 50
+  - entity: time
+    name: Secondary feed-in start
+    category: config
+    icon: "mdi:clock-start"
+    dps:
+      - id: 148
+        type: integer
+        name: hour
+        range:
+          min: 0
+          max: 23
+      - id: 149
+        type: integer
+        name: minute
+        range:
+          min: 0
+          max: 59
+  - entity: time
+    name: Secondary feed-in end
+    category: config
+    icon: "mdi:clock-end"
+    dps:
+      - id: 150
+        type: integer
+        name: hour
+        range:
+          min: 0
+          max: 23
+      - id: 151
+        type: integer
+        name: minute
+        range:
+          min: 0
+          max: 59