Преглед изворни кода

Holman WX1/2: rename "time left" to "time remaining"

Since this release is incompatibly changing these from number to
sensor, make this naming change at the same time to the more common in
other devices, and less ambiguous "remaining" instead of "left".
This will maybe avoid another incompatible change in a future release.
Jason Rumney пре 2 година
родитељ
комит
b5e2dcae29

+ 11 - 8
custom_components/tuya_local/devices/holman_wx1_taptimer.yaml

@@ -93,7 +93,7 @@ secondary_entities:
           min: 0
           min: 0
           max: 60
           max: 60
   - entity: sensor
   - entity: sensor
-    name: Time left
+    name: Time remaining
     class: duration
     class: duration
     category: diagnostic
     category: diagnostic
     dps:
     dps:
@@ -114,7 +114,8 @@ secondary_entities:
         type: base64
         type: base64
       - id: 110
       - id: 110
         optional: true
         optional: true
-        name: days  # flags for days of the week Sun-Sat, plus a bit for on/off
+        # flags for days of the week Sun-Sat, plus a bit for on/off
+        name: days
         type: base64
         type: base64
         mapping:
         mapping:
           - mask: "FF000000"
           - mask: "FF000000"
@@ -143,7 +144,7 @@ secondary_entities:
         mapping:
         mapping:
           - mask: "FF00000000000000"
           - mask: "FF00000000000000"
   - entity: sensor
   - entity: sensor
-    name: Start B encoded  # start time, duration and days for start B
+    name: Start B encoded
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 111
       - id: 111
@@ -152,7 +153,7 @@ secondary_entities:
         type: string
         type: string
       - id: 111
       - id: 111
         optional: true
         optional: true
-        name: days  # flags for days of the week Sun-Sat, plus a bit for on/off
+        name: days
         type: base64
         type: base64
         mapping:
         mapping:
           - mask: "FF000000"
           - mask: "FF000000"
@@ -181,7 +182,7 @@ secondary_entities:
         mapping:
         mapping:
           - mask: "FF00000000000000"
           - mask: "FF00000000000000"
   - entity: sensor
   - entity: sensor
-    name: Start C encoded  # start time, duration and days for start C
+    name: Start C encoded
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 112
       - id: 112
@@ -190,7 +191,7 @@ secondary_entities:
         type: string
         type: string
       - id: 112
       - id: 112
         optional: true
         optional: true
-        name: days  # flags for days of the week Sun-Sat, plus a bit for on/off
+        name: days
         type: base64
         type: base64
         mapping:
         mapping:
           - mask: "FF000000"
           - mask: "FF000000"
@@ -275,7 +276,8 @@ secondary_entities:
         name: sensor
         name: sensor
         type: integer
         type: integer
   - entity: sensor
   - entity: sensor
-    name: Flow count encoded  # past 10 days of flow count history.
+    # past 10 days of flow count history.
+    name: Flow count encoded
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 121
       - id: 121
@@ -430,7 +432,8 @@ secondary_entities:
         name: sensor_present
         name: sensor_present
         type: boolean
         type: boolean
   - entity: sensor
   - entity: sensor
-    name: Next watering encoded  # based on starts A, B and C
+    # based on starts A, B and C
+    name: Next watering encoded
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 128
       - id: 128

+ 23 - 18
custom_components/tuya_local/devices/holman_wx2_taptimer.yaml

@@ -102,7 +102,7 @@ secondary_entities:
           min: 0
           min: 0
           max: 60
           max: 60
   - entity: sensor
   - entity: sensor
-    name: Time left 1
+    name: Time remaining 1
     class: duration
     class: duration
     category: diagnostic
     category: diagnostic
     dps:
     dps:
@@ -112,7 +112,7 @@ secondary_entities:
         name: sensor
         name: sensor
         unit: min
         unit: min
   - entity: sensor
   - entity: sensor
-    name: Start A 1 encoded  # start time, duration and days for start A
+    name: Start A 1 encoded
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 110
       - id: 110
@@ -121,7 +121,8 @@ secondary_entities:
         type: base64
         type: base64
       - id: 110
       - id: 110
         optional: true
         optional: true
-        name: days  # flags for days of the week Sun-Sat, plus a bit for on/off
+        # flags for days of the week Sun-Sat, plus a bit for on/off
+        name: days
         type: base64
         type: base64
         mapping:
         mapping:
           - mask: "FF000000"
           - mask: "FF000000"
@@ -150,7 +151,7 @@ secondary_entities:
         mapping:
         mapping:
           - mask: "FF00000000000000"
           - mask: "FF00000000000000"
   - entity: sensor
   - entity: sensor
-    name: Start B 1 encoded  # start time, duration and days for start B
+    name: Start B 1 encoded
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 111
       - id: 111
@@ -159,7 +160,7 @@ secondary_entities:
         type: string
         type: string
       - id: 111
       - id: 111
         optional: true
         optional: true
-        name: days  # flags for days of the week Sun-Sat, plus a bit for on/off
+        name: days
         type: base64
         type: base64
         mapping:
         mapping:
           - mask: "FF000000"
           - mask: "FF000000"
@@ -188,7 +189,7 @@ secondary_entities:
         mapping:
         mapping:
           - mask: "FF00000000000000"
           - mask: "FF00000000000000"
   - entity: sensor
   - entity: sensor
-    name: Start C 1 encoded  # start time, duration and days for start C
+    name: Start C 1 encoded
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 112
       - id: 112
@@ -197,7 +198,7 @@ secondary_entities:
         type: string
         type: string
       - id: 112
       - id: 112
         optional: true
         optional: true
-        name: days  # flags for days of the week Sun-Sat, plus a bit for on/off
+        name: days
         type: base64
         type: base64
         mapping:
         mapping:
           - mask: "FF000000"
           - mask: "FF000000"
@@ -297,7 +298,7 @@ secondary_entities:
         name: sensor
         name: sensor
         type: integer
         type: integer
   - entity: sensor
   - entity: sensor
-    name: Flow count 1 encoded  # past 10 days of flow count history
+    name: Flow count 1 encoded
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 121
       - id: 121
@@ -455,7 +456,8 @@ secondary_entities:
         name: sensor
         name: sensor
         type: string
         type: string
   - entity: sensor
   - entity: sensor
-    name: Next watering 1 encoded  # based on starts A, B and C
+    name: Next watering 1 encoded
+    # based on starts A, B and C
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 128
       - id: 128
@@ -551,9 +553,10 @@ secondary_entities:
           min: 0
           min: 0
           max: 60
           max: 60
   - entity: sensor
   - entity: sensor
-    name: Time left 2  # doesn't seem to get populated with manual watering
+    name: Time remaining 2
     class: duration
     class: duration
     category: diagnostic
     category: diagnostic
+    # doesn't seem to get populated with manual watering
     dps:
     dps:
       - id: 156
       - id: 156
         optional: true
         optional: true
@@ -561,7 +564,7 @@ secondary_entities:
         name: sensor
         name: sensor
         unit: min
         unit: min
   - entity: sensor
   - entity: sensor
-    name: Start A 2 encoded  # start time, duration and days for start A
+    name: Start A 2 encoded
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 157
       - id: 157
@@ -569,8 +572,9 @@ secondary_entities:
         name: sensor
         name: sensor
         type: base64
         type: base64
       - id: 157
       - id: 157
+        # flags for days of the week Sun-Sat, plus a bit for on/off
         optional: true
         optional: true
-        name: days  # flags for days of the week Sun-Sat, plus a bit for on/off
+        name: days
         type: base64
         type: base64
         mapping:
         mapping:
           - mask: "FF000000"
           - mask: "FF000000"
@@ -599,7 +603,7 @@ secondary_entities:
         mapping:
         mapping:
           - mask: "FF00000000000000"
           - mask: "FF00000000000000"
   - entity: sensor
   - entity: sensor
-    name: Start B 2 encoded  # start time, duration and days for start B
+    name: Start B 2 encoded
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 158
       - id: 158
@@ -608,7 +612,7 @@ secondary_entities:
         type: string
         type: string
       - id: 158
       - id: 158
         optional: true
         optional: true
-        name: days  # flags for days of the week Sun-Sat, plus a bit for on/off
+        name: days
         type: base64
         type: base64
         mapping:
         mapping:
           - mask: "FF000000"
           - mask: "FF000000"
@@ -637,7 +641,7 @@ secondary_entities:
         mapping:
         mapping:
           - mask: "FF00000000000000"
           - mask: "FF00000000000000"
   - entity: sensor
   - entity: sensor
-    name: Start C 2 encoded  # start time, duration and days for start C
+    name: Start C 2 encoded
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 159
       - id: 159
@@ -646,7 +650,7 @@ secondary_entities:
         type: string
         type: string
       - id: 159
       - id: 159
         optional: true
         optional: true
-        name: days  # flags for days of the week Sun-Sat, plus a bit for on/off
+        name: days
         type: base64
         type: base64
         mapping:
         mapping:
           - mask: "FF000000"
           - mask: "FF000000"
@@ -705,7 +709,8 @@ secondary_entities:
         name: sensor
         name: sensor
         type: boolean
         type: boolean
   - entity: sensor
   - entity: sensor
-    name: Flow count 2 encoded  # past 10 days of flow count history
+    name: Flow count 2 encoded
+    # past 10 days of flow count history
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 163
       - id: 163
@@ -856,7 +861,7 @@ secondary_entities:
         name: sensor
         name: sensor
         type: boolean
         type: boolean
   - entity: sensor
   - entity: sensor
-    name: Next watering 2 encoded  # based on starts A, B and C
+    name: Next watering 2 encoded
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 167
       - id: 167