[gardena] remove compiler warnings (#12947)

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
This commit is contained in:
Andrew Fiddian-Green 2022-06-16 21:44:25 +02:00 committed by GitHub
parent f8bbb2b5a5
commit 4036888433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -108,6 +108,7 @@ openhab:send WC_Valve_cmd_CloseValve.sendCommand(ON) // stop any active watering
```
If you send a REFRESH command to the last update timestamp (no matter which thing), **ALL** items from **ALL** things are updated
```
DateTime LastUpdate "LastUpdate [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" { channel="gardena:water_control:home:myWateringComputer:common#lastUpdate_timestamp" }

View File

@ -126,8 +126,7 @@ public class Device {
valveSet = (ValveSetServiceDataItem) dataItem;
} else if (dataItem instanceof ValveServiceDataItem) {
String valveNumber = StringUtils.substringAfterLast(dataItem.id, ":");
if (valveNumber != null
&& (valveNumber.equals("") || valveNumber.equals("wc") || valveNumber.equals("0"))) {
if ("".equals(valveNumber) || "wc".equals(valveNumber) || "0".equals(valveNumber)) {
valve = (ValveServiceDataItem) dataItem;
} else if ("1".equals(valveNumber)) {
valveOne = (ValveServiceDataItem) dataItem;