]> git.basschouten.com Git - openhab-addons.git/commitdiff
[sonnen] Fix channel types, Energy should be Power (#15384)
authorTim <tim@fruit-lab.de>
Fri, 3 Nov 2023 20:29:39 +0000 (21:29 +0100)
committerGitHub <noreply@github.com>
Fri, 3 Nov 2023 20:29:39 +0000 (21:29 +0100)
Also adapt the documentation and drop the batteryFeedIn in the documentation
which is not part of the binding.

Fix #15365

Signed-off-by: Tim Lochmüller <tim@fruit-lab.de>
bundles/org.openhab.binding.sonnen/README.md
bundles/org.openhab.binding.sonnen/src/main/resources/OH-INF/thing/thing-types.xml
bundles/org.openhab.binding.sonnen/src/main/resources/OH-INF/update/instructions.xml

index 90b0156f96f3975e18ac605670f4f4f0bc7629f9..0388a5cf1a5405040c7130726b3e1342e8f4652b 100644 (file)
@@ -23,15 +23,13 @@ The following channels are yet supported:
 | Channel                        | Type          | Access | Description                                                                             |
 | ------------------------------ | ------------- | ------ | --------------------------------------------------------------------------------------- |
 | batteryChargingState           | Switch        | read   | Indicates if the Battery is charging at that moment                                     |
-| batteryCharging                | Number:Energy | read   | Indicates the actual current charging the Battery. Otherwise 0.                         |
+| batteryCharging                | Number:Power  | read   | Indicates the actual current charging the Battery. Otherwise 0.                         |
 | batteryDischargingState        | Switch        | read   | Indicates if the Battery is discharging at that moment                                  |
-| batteryDischarging             | Number:Energy | read   | Indicates the actual current discharging the Battery. Otherwise 0.                      |
-| batteryFeedIn                  | Number:Energy | read   | Indicates the actual charging current of the Battery in watt                            |
-| batteryDischarging             | Number:Energy | read   | Indicates the actual current discharging the Battery in watt                            |
-| consumption                    | Number:Energy | read   | Indicates the actual consumption of the consumer in watt                                |
-| gridFeedIn                     | Number:Energy | read   | Indicates the actual current feeding to the Grid in watt.0 if nothing is feeded         |
-| gridConsumption                | Number:Energy | read   | Indicates the actual current consumption from the Grid in watt.0 if nothing is received |
-| solarProduction                | Number:Energy | read   | Indicates the actual production of the Solar system in watt                             |
+| batteryDischarging             | Number:Power  | read   | Indicates the actual current discharging the Battery. Otherwise 0.                      |
+| consumption                    | Number:Power  | read   | Indicates the actual consumption of the consumer in watt                                |
+| gridFeedIn                     | Number:Power  | read   | Indicates the actual current feeding to the Grid in watt.0 if nothing is feeded         |
+| gridConsumption                | Number:Power  | read   | Indicates the actual current consumption from the Grid in watt.0 if nothing is received |
+| solarProduction                | Number:Power  | read   | Indicates the actual production of the Solar system in watt                             |
 | batteryLevel                   | Number        | read   | Indicates the actual Battery Level in % from 0 - 100                                    |
 | flowConsumptionBatteryState    | Switch        | read   | Indicates if there is a current flow from Battery towards Consumption                   |
 | flowConsumptionGridState       | Switch        | read   | Indicates if there is a current flow from Grid towards Consumption                      |
index 705804c20508db2477abafcf0ecc8562bda69641..e456835919876db9b948bb9e4906439d0d126113 100644 (file)
@@ -32,7 +32,7 @@
                </channels>
                <properties>
                        <property name="vendor">sonnen</property>
-                       <property name="thingTypeVersion">1</property>
+                       <property name="thingTypeVersion">2</property>
                </properties>
 
                <config-description>
                <state readOnly="true"/>
        </channel-type>
        <channel-type id="batteryCharging">
-               <item-type>Number:Energy</item-type>
+               <item-type>Number:Power</item-type>
                <label>Battery Charging</label>
                <description>Indicates the actual current charging the Battery. Otherwise 0.</description>
                <state readOnly="true" pattern="%.0f %unit%"/>
        </channel-type>
        <channel-type id="batteryDischarging">
-               <item-type>Number:Energy</item-type>
+               <item-type>Number:Power</item-type>
                <label>Battery Discharging</label>
                <description>Indicates the actual current discharging the Battery. Otherwise 0.</description>
                <state readOnly="true" pattern="%.0f %unit%"/>
        </channel-type>
        <channel-type id="consumption">
-               <item-type>Number:Energy</item-type>
+               <item-type>Number:Power</item-type>
                <label>Consumption</label>
                <description>Indicates the actual consumption of the House.</description>
                <state readOnly="true" pattern="%.0f %unit%"/>
        </channel-type>
        <channel-type id="gridFeedIn">
-               <item-type>Number:Energy</item-type>
+               <item-type>Number:Power</item-type>
                <label>Grid Feed In</label>
                <description>Indicates the actual current feeding to the Grid. Otherwise 0.</description>
                <state readOnly="true" pattern="%.0f %unit%"/>
        </channel-type>
        <channel-type id="gridConsumption">
-               <item-type>Number:Energy</item-type>
+               <item-type>Number:Power</item-type>
                <label>Grid Consumption</label>
                <description>Indicates the actual current consumption from the the Grid. Otherwise 0.</description>
                <state readOnly="true" pattern="%.0f %unit%"/>
        </channel-type>
        <channel-type id="solarProduction">
-               <item-type>Number:Energy</item-type>
+               <item-type>Number:Power</item-type>
                <label>Solar Production</label>
                <description>Indicates the actual production of the Solar system.</description>
                <state readOnly="true" pattern="%.0f %unit%"/>
index 61699a648f5e87d2d3c57c934d4cf0b38afc2f6d..2412b9a02bbe7e3a79c340ff3a1f14cec07f70c8 100644 (file)
                                <type>sonnen:energyExportedStateConsumption</type>
                        </add-channel>
                </instruction-set>
+
+               <instruction-set targetVersion="2">
+                       <update-channel id="batteryCharging">
+                               <type>sonnen:batteryCharging</type>
+                       </update-channel>
+                       <update-channel id="batteryDischarging">
+                               <type>sonnen:batteryDischarging</type>
+                       </update-channel>
+                       <update-channel id="consumption">
+                               <type>sonnen:consumption</type>
+                       </update-channel>
+                       <update-channel id="gridFeedIn">
+                               <type>sonnen:gridFeedIn</type>
+                       </update-channel>
+                       <update-channel id="gridConsumption">
+                               <type>sonnen:gridConsumption</type>
+                       </update-channel>
+                       <update-channel id="solarProduction">
+                               <type>sonnen:solarProduction</type>
+                       </update-channel>
+               </instruction-set>
        </thing-type>
 </update:update-descriptions>