Skip to content

Commit 0bf8a7d

Browse files
authored
[solarforecast] Fix latest-update channel typo (openhab#18373)
* bugfix channel and example typos Signed-off-by: Bernd Weymann <[email protected]>
1 parent 703796d commit 0bf8a7d

File tree

5 files changed

+23
-9
lines changed

5 files changed

+23
-9
lines changed

bundles/org.openhab.binding.solarforecast/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@ Number:Energy Solcast_Site_Pessimistic_Today "Today's total ene
348348

349349
// site API call counter
350350
Number Solcast_Site_API_Sucess_Counter "Site API Counter" {channel="solarforecast:sc-site:homeSite:update#api-count" [ profile="transform:JSONPATH", function="$.200"]}
351-
Number Solcast_Site_API_Throttle_Counter "Site API Throttle Counter" {channel="solarforecast:sc-site:homeSite:update#api-count" [ profile="transform:JSONPATH", function="$.200"]}
352-
Number Solcast_Site_API_Error_Counter "Site API ErrorCounter" {channel="solarforecast:sc-site:homeSite:update#api-count" [ profile="transform:JSONPATH", function="$.200"]}
353-
DateTime Solcast_Site_API_LastUpdate "Site API Last Update" {channel="solarforecast:sc-site:homeSite:update#lastest-update"}
351+
Number Solcast_Site_API_Throttle_Counter "Site API Throttle Counter" {channel="solarforecast:sc-site:homeSite:update#api-count" [ profile="transform:JSONPATH", function="$.429"]}
352+
Number Solcast_Site_API_Error_Counter "Site API ErrorCounter" {channel="solarforecast:sc-site:homeSite:update#api-count" [ profile="transform:JSONPATH", function="$.other"]}
353+
DateTime Solcast_Site_API_LastUpdate "Site API Last Update" {channel="solarforecast:sc-site:homeSite:update#latest-update"}
354354

355355
// estimation items
356356
Group influxdb
@@ -381,9 +381,9 @@ Number:Energy Solcast_Plane_Pessimistic_Today_SW "SW Today's pessim
381381

382382
// plane API call counter
383383
Number Solcast_Plane_API_Sucess_Counter "Plane API Counter" {channel="solarforecast:sc-plane:homeSite:planeSouthWest:update#api-count" [ profile="transform:JSONPATH", function="$.200"]}
384-
Number Solcast_Plane_API_Throttle_Counter "Plane API Throttle Counter" {channel="solarforecast:sc-plane:homeSite:planeSouthWest:update#api-count" [ profile="transform:JSONPATH", function="$.200"]}
385-
Number Solcast_Plane_API_Error_Counter "Plane API ErrorCounter" {channel="solarforecast:sc-plane:homeSite:planeSouthWest:update#api-count" [ profile="transform:JSONPATH", function="$.200"]}
386-
DateTime Solcast_Plane_API_LastUpdate "Plane API Last Update" {channel="solarforecast:sc-plane:homeSite:planeSouthWest:update#lastest-update"}
384+
Number Solcast_Plane_API_Throttle_Counter "Plane API Throttle Counter" {channel="solarforecast:sc-plane:homeSite:planeSouthWest:update#api-count" [ profile="transform:JSONPATH", function="$.429"]}
385+
Number Solcast_Plane_API_Error_Counter "Plane API ErrorCounter" {channel="solarforecast:sc-plane:homeSite:planeSouthWest:update#api-count" [ profile="transform:JSONPATH", function="$.other"]}
386+
DateTime Solcast_Plane_API_LastUpdate "Plane API Last Update" {channel="solarforecast:sc-plane:homeSite:planeSouthWest:update#latest-update"}
387387

388388
// plane estimation items
389389
Number:Power Solcast_Plane_Average_Power_Estimate "Plane Average Power estimations" (influxdb) {channel="solarforecast:sc-plane:homeSite:planeSouthWest:average#power-estimate", stateDescription=" "[ pattern="%.0f %unit%" ], unit="W"}

bundles/org.openhab.binding.solarforecast/src/main/resources/OH-INF/thing/sc-plane-type.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</channel-groups>
2222

2323
<properties>
24-
<property name="thingTypeVersion">1</property>
24+
<property name="thingTypeVersion">2</property>
2525
</properties>
2626

2727
<config-description-ref uri="thing-type:solarforecast:sc-plane"/>

bundles/org.openhab.binding.solarforecast/src/main/resources/OH-INF/thing/sc-site-type.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</channel-groups>
1717

1818
<properties>
19-
<property name="thingTypeVersion">1</property>
19+
<property name="thingTypeVersion">2</property>
2020
</properties>
2121

2222
<config-description-ref uri="thing-type:solarforecast:sc-site"/>

bundles/org.openhab.binding.solarforecast/src/main/resources/OH-INF/thing/update-group.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<description>Channels regarding forecast updates</description>
99
<channels>
1010
<channel id="api-count" typeId="api-count"/>
11-
<channel id="lastest-update" typeId="latest-update"/>
11+
<channel id="latest-update" typeId="latest-update"/>
1212
</channels>
1313
</channel-group-type>
1414
</thing:thing-descriptions>

bundles/org.openhab.binding.solarforecast/src/main/resources/OH-INF/update/instructions.xml

+14
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
<type>solarforecast:latest-update</type>
1313
</add-channel>
1414
</instruction-set>
15+
<instruction-set targetVersion="2">
16+
<remove-channel id="lastest-update" groupIds="update">
17+
</remove-channel>
18+
<add-channel id="latest-update" groupIds="update">
19+
<type>solarforecast:latest-update</type>
20+
</add-channel>
21+
</instruction-set>
1522
</thing-type>
1623

1724
<thing-type uid="solarforecast:sc-site">
@@ -23,6 +30,13 @@
2330
<type>solarforecast:latest-update</type>
2431
</add-channel>
2532
</instruction-set>
33+
<instruction-set targetVersion="2">
34+
<remove-channel id="lastest-update" groupIds="update">
35+
</remove-channel>
36+
<add-channel id="latest-update" groupIds="update">
37+
<type>solarforecast:latest-update</type>
38+
</add-channel>
39+
</instruction-set>
2640
</thing-type>
2741

2842
</update:update-descriptions>

0 commit comments

Comments
 (0)