Browse Source

Adding support for commonly found SR223 solar controller (#4722)

* Adding support for commonly found SR223 solar controller

* Update sr223_solar_controller.yaml

Updated to support new config syntax

* fix (shuangri_sr223_solarcontroller): naming changes

- add manufacturer (likely original manufacturer based on online manual availability and match to model prefix)
- follow file naming convention brand_model_type
- Use generic top level name in case of other models matching
- follow HA naming convention (only first word capitalised)
- shorten entity names
- use HA provided class translations for signal_strength
- add unit to pump speed

PR #4722

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Tom Penrose 1 week ago
parent
commit
08b94bba44

+ 47 - 0
custom_components/tuya_local/devices/shuangri_sr223_solarcontroller.yaml

@@ -0,0 +1,47 @@
+name: Solar water heater
+products:
+  - id: mlezgpkhb08dvjjx
+    manufacturer: Shuangri
+    model: SR223
+entities:
+  # Solar Collector Temperature (T1)
+  - entity: sensor
+    name: Solar collector temperature
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 26
+        type: integer
+        name: sensor
+        unit: C
+        mapping:
+          - scale: 10
+  # Tank Temperature (T2)
+  - entity: sensor
+    name: Tank temperature
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 22
+        type: integer
+        name: sensor
+        unit: C
+        mapping:
+          - scale: 10
+  # Pump Speed
+  - entity: sensor
+    name: Pump speed
+    dps:
+      - id: 112
+        type: integer
+        name: sensor
+        unit: rpm
+  # WiFi Signal Strength
+  - entity: sensor
+    class: signal_strength
+    category: diagnostic
+    dps:
+      - id: 107
+        type: integer
+        name: sensor
+        unit: dBm