Skip to content

Commit

Permalink
Merge branch 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
docbender committed Nov 4, 2022
2 parents 0590d07 + 7a6ee58 commit e1bf806
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
#stale-issue-message: 'This issue is stale because it has been open for 30 days with no activity.'
stale-issue-message: 'This issue is stale because it has been open for 30 days with no activity.'
close-issue-message: "This issue was closed because it has been inactive for 10 days since being marked as stale."
#stale-pr-message: 'This pull request is stale because it has been open for 30 days with no activity.'
stale-pr-message: 'This pull request is stale because it has been open for 30 days with no activity.'
close-pr-message: "This pull request was closed because it has been inactive for 10 days since being marked as stale."
stale-issue-label: 'stale'
stale-pr-label: 'stale'
days-before-issue-stale: 30
days-before-issue-close: 10
days-before-pr-stale: 30
days-before-pr-close: 10
exempt-issue-label: question,bug,enhancement,help wanted
exempt-issue-labels: question,bug,enhancement,help wanted
exempt-pr-labels: help wanted
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ This binding for openHAB has ability to connect Simatic PLC over Ethernet with i
[![Version](https://img.shields.io/github/v/release/docbender/openHAB-Simatic?include_prereleases)](https:/docbender/openHAB-Simatic/releases)
[![Download](https://img.shields.io/github/downloads/docbender/openHAB-Simatic/total.svg)](https:/docbender/openHAB-Simatic/releases)
[![Issues](https://img.shields.io/github/issues/docbender/openHAB-Simatic)](https:/docbender/openHAB-Simatic/issues)
[![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")
[![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")

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

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

Binding is compatible with openHAB 3.0. For previous openHAB versions (1.8 and 2.x) see oh1.8 branch.

Simatic is a registered trademark of Siemens AG.
Binary file added img/simatic_256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/simatic_512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,7 @@ public void setState(byte[] buffer, int start) {
setState(new StringType(str));
} else if (isNumber()) {
if (getStateAddress().isFloat()) {
setState(hasUnit() ? new QuantityType<>(bb.getFloat(), getUnit())
: new DecimalType((Number) bb.getFloat()));
setState(hasUnit() ? new QuantityType<>(bb.getFloat(), getUnit()) : new DecimalType(bb.getFloat()));
} else {
final int intValue;
if (getStateAddress().getSimaticDataType() == SimaticPLCDataTypes.BIT) {
Expand All @@ -410,7 +409,7 @@ public void setState(byte[] buffer, int start) {
intValue = 0;
}

setState(hasUnit() ? new QuantityType<>(intValue, getUnit()) : new DecimalType((Number) intValue));
setState(hasUnit() ? new QuantityType<>(intValue, getUnit()) : new DecimalType(intValue));
}
} else if (isDimmer()) {
setState(new PercentType(bb.get()));
Expand Down

0 comments on commit e1bf806

Please sign in to comment.