mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[ism8] Fix SAT warnings (#14141)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
parent
8fcfa0438b
commit
d1634fbc18
@ -55,7 +55,7 @@ public class DataPointBool extends DataPointBase<@Nullable Boolean> {
|
||||
@Override
|
||||
protected byte[] convertWriteValue(Object value) {
|
||||
String valueText = value.toString().toLowerCase();
|
||||
if (valueText.equalsIgnoreCase("true") || valueText.equalsIgnoreCase("1")) {
|
||||
if ("true".equalsIgnoreCase(valueText) || "1".equalsIgnoreCase(valueText)) {
|
||||
this.setValue(true);
|
||||
return new byte[] { 0x01 };
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ public class DataPointLongValue extends DataPointBase<@Nullable Double> {
|
||||
public DataPointLongValue(int id, String knxDataType, String description) {
|
||||
super(id, knxDataType, description);
|
||||
|
||||
if (knxDataType.equals("13.002")) {
|
||||
if ("13.002".equals(knxDataType)) {
|
||||
this.setUnit("m³/h");
|
||||
this.factor = 0.0001f;
|
||||
this.outputFormat = "%.1f";
|
||||
|
@ -33,15 +33,15 @@ public class DataPointValue extends DataPointBase<@Nullable Double> {
|
||||
public DataPointValue(int id, String knxDataType, String description) {
|
||||
super(id, knxDataType, description);
|
||||
this.factor = 0.0f;
|
||||
if (knxDataType.equals("9.001")) {
|
||||
if ("9.001".equals(knxDataType)) {
|
||||
this.setUnit("°C");
|
||||
this.factor = 0.01f;
|
||||
this.outputFormat = "%.1f";
|
||||
} else if (knxDataType.equals("9.002")) {
|
||||
} else if ("9.002".equals(knxDataType)) {
|
||||
this.setUnit("°K");
|
||||
this.factor = 0.01f;
|
||||
this.outputFormat = "%.1f";
|
||||
} else if (knxDataType.equals("9.006")) {
|
||||
} else if ("9.006".equals(knxDataType)) {
|
||||
this.setUnit("Bar");
|
||||
this.factor = 0.0000001f;
|
||||
this.outputFormat = "%.2f";
|
||||
|
@ -27,8 +27,8 @@ import org.slf4j.LoggerFactory;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class KnxNetFrame {
|
||||
public static byte[] KNX_HEADER = new byte[6];
|
||||
public static byte[] CONNECTION_HEADER = new byte[4];
|
||||
public static final byte[] KNX_HEADER = new byte[6];
|
||||
public static final byte[] CONNECTION_HEADER = new byte[4];
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(KnxNetFrame.class);
|
||||
private ArrayList<SetDatapointValueMessage> valueMessages = new ArrayList<SetDatapointValueMessage>();
|
||||
|
Loading…
Reference in New Issue
Block a user