Skip to content

Commit e1bf806

Browse files
committed
Merge branch 'master'
2 parents 0590d07 + 7a6ee58 commit e1bf806

5 files changed

Lines changed: 7 additions & 8 deletions

File tree

.github/workflows/stale.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
- uses: actions/stale@v3
2121
with:
2222
repo-token: ${{ secrets.GITHUB_TOKEN }}
23-
#stale-issue-message: 'This issue is stale because it has been open for 30 days with no activity.'
23+
stale-issue-message: 'This issue is stale because it has been open for 30 days with no activity.'
2424
close-issue-message: "This issue was closed because it has been inactive for 10 days since being marked as stale."
25-
#stale-pr-message: 'This pull request is stale because it has been open for 30 days with no activity.'
25+
stale-pr-message: 'This pull request is stale because it has been open for 30 days with no activity.'
2626
close-pr-message: "This pull request was closed because it has been inactive for 10 days since being marked as stale."
2727
stale-issue-label: 'stale'
2828
stale-pr-label: 'stale'
2929
days-before-issue-stale: 30
3030
days-before-issue-close: 10
3131
days-before-pr-stale: 30
3232
days-before-pr-close: 10
33-
exempt-issue-label: question,bug,enhancement,help wanted
33+
exempt-issue-labels: question,bug,enhancement,help wanted
3434
exempt-pr-labels: help wanted

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ This binding for openHAB has ability to connect Simatic PLC over Ethernet with i
66
[![Version](https://img.shields.io/github/v/release/docbender/openHAB-Simatic?include_prereleases)](https://github.com/docbender/openHAB-Simatic/releases)
77
[![Download](https://img.shields.io/github/downloads/docbender/openHAB-Simatic/total.svg)](https://github.com/docbender/openHAB-Simatic/releases)
88
[![Issues](https://img.shields.io/github/issues/docbender/openHAB-Simatic)](https://github.com/docbender/openHAB-Simatic/issues)
9-
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/docbender/openHAB-Simatic.svg)](http://isitmaintained.com/project/docbender/openHAB-Simatic "Average time to resolve an issue")
10-
[![Percentage of issues still open](http://isitmaintained.com/badge/open/docbender/openHAB-Simatic.svg)](http://isitmaintained.com/project/docbender/openHAB-Simatic "Percentage of issues still open")
119

1210
Binding uses libnodave library to provide connection (https://sourceforge.net/projects/libnodave/).
1311

@@ -16,3 +14,5 @@ More about this can be found on wiki page: https://github.com/docbender/openHAB-
1614
Compiled binding is inserted into release branch: https://github.com/docbender/openHAB-Simatic/releases
1715

1816
Binding is compatible with openHAB 3.0. For previous openHAB versions (1.8 and 2.x) see oh1.8 branch.
17+
18+
Simatic is a registered trademark of Siemens AG.

img/simatic_256.png

2.54 KB
Loading

img/simatic_512.png

4.46 KB
Loading

org.openhab.binding.simatic/src/main/java/org/openhab/binding/simatic/internal/simatic/SimaticChannel.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,7 @@ public void setState(byte[] buffer, int start) {
394394
setState(new StringType(str));
395395
} else if (isNumber()) {
396396
if (getStateAddress().isFloat()) {
397-
setState(hasUnit() ? new QuantityType<>(bb.getFloat(), getUnit())
398-
: new DecimalType((Number) bb.getFloat()));
397+
setState(hasUnit() ? new QuantityType<>(bb.getFloat(), getUnit()) : new DecimalType(bb.getFloat()));
399398
} else {
400399
final int intValue;
401400
if (getStateAddress().getSimaticDataType() == SimaticPLCDataTypes.BIT) {
@@ -410,7 +409,7 @@ public void setState(byte[] buffer, int start) {
410409
intValue = 0;
411410
}
412411

413-
setState(hasUnit() ? new QuantityType<>(intValue, getUnit()) : new DecimalType((Number) intValue));
412+
setState(hasUnit() ? new QuantityType<>(intValue, getUnit()) : new DecimalType(intValue));
414413
}
415414
} else if (isDimmer()) {
416415
setState(new PercentType(bb.get()));

0 commit comments

Comments
 (0)