Просмотр исходного кода

Update eurom_sani_bathroom_towel_radiator.yaml

The separate temperatures (room and heater surface) are now secondary entities, and the current temperature no longer uses a dummy dp id.
Jan-Gerard van der Toorn 1 год назад
Родитель
Сommit
bcee4c37ed

+ 55 - 15
custom_components/tuya_local/devices/eurom_sani_bathroom_towel_radiator.yaml

@@ -23,6 +23,7 @@ primary_entity:
       range:
         min: 0
         max: 37
+      unit: C
       mapping:
         - constraint: mode
           conditions:
@@ -31,24 +32,40 @@ primary_entity:
               range:
                 min: 40
                 max: 70
-    - id: 333
-      # dummy variable for current temperature of
-      # current mode (room / towel) while keeping
-      # both measured values available
+    - id: 3
       type: integer
       name: current_temperature
-      optional: true
-      # read_only: true
+      unit: C
       mapping:
         - constraint: mode
           conditions:
             - dps_val: "t"
-              value_mirror: heater_temperature
-            - dps_val: "r"
-              value_mirror: room_temperature
-    - id: 3
+              value_mirror: surface_temperature_internal
+#    - id: 333
+#      # dummy variable for current temperature of
+#      # current mode (room / towel) while keeping
+#      # both measured values available
+#      type: integer
+#      name: current_temperature
+#      optional: true
+#      # read_only: true
+#      unit: C
+#      mapping:
+#        - constraint: mode
+#          conditions:
+#            - dps_val: "t"
+#              value_mirror: surface_temperature_internal
+#            - dps_val: "r"
+#              value_mirror: room_temperature_internal
+#    - id: 3
+#      type: integer
+#      name: room_temperature_internal
+#      hidden: true
+    - id: 105
+      name: surface_temperature_internal
       type: integer
-      name: room_temperature
+      optional: true
+      hidden: true
     - id: 12
       name: error
       type: bitfield
@@ -81,15 +98,12 @@ primary_entity:
           value: "room"
         - dps_val: "t"
           value: "towel"
-    - id: 105
-      name: heater_temperature
-      type: integer
-      optional: true
     - id: 106
       name: towel_dry_temperature
       type: integer
       hidden: true
       optional: true
+      unit: C
       range:
         min: 40
         max: 70
@@ -110,3 +124,29 @@ secondary_entities:
       - id: 102
         type: boolean
         name: switch
+  - entity: sensor
+    name: "Surface temperature"
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 105
+        type: integer
+        name: sensor
+        unit: C
+  - entity: sensor
+    name: "Room temperature"
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 3
+        type: integer
+        name: sensor
+        unit: C
+#  - entity: switch
+#    NOT WORKING: duplicate dps id's not functioning
+#    name: "Anti-frost mode"
+#    icon: "mdi:snowflake-melt"
+#    dps:
+#      - id: 103
+#        name: anti_frost
+#        type: boolean