Skip to content

Commit

Permalink
[sonnen] Fix channel types, Energy should be Power (openhab#15384)
Browse files Browse the repository at this point in the history
Also adapt the documentation and drop the batteryFeedIn in the documentation
which is not part of the binding.

Fix openhab#15365

Signed-off-by: Tim Lochmüller <[email protected]>
  • Loading branch information
lochmueller authored and andrewfg committed Nov 26, 2023
1 parent 3f98979 commit 2d5ce5a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 15 deletions.
14 changes: 6 additions & 8 deletions bundles/org.openhab.binding.sonnen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</channels>
<properties>
<property name="vendor">sonnen</property>
<property name="thingTypeVersion">1</property>
<property name="thingTypeVersion">2</property>
</properties>

<config-description>
Expand Down Expand Up @@ -71,37 +71,37 @@
<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%"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,26 @@
<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>

0 comments on commit 2d5ce5a

Please sign in to comment.