Code cleansing started

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
This commit is contained in:
Gaël L'hopital 2024-06-19 16:28:12 +02:00
parent 6096891d00
commit 022df3b147
5 changed files with 1 additions and 42 deletions

View File

@ -105,7 +105,6 @@ public class WorxLandroidBindingConstants {
public static final String CHANNEL_RAIN_STATE = "state";
public static final String CHANNEL_RAIN_COUNTER = "counter";
//
public static final String CHANNEL_PREFIX_ALLOCATION = "allocation-%d";
public static final String CHANNEL_PREFIX_ZONE = "zone-%d";
}

View File

@ -1,31 +0,0 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.worxlandroid.internal;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* The {@link WorxLandroidConfiguration} class contains fields mapping thing configuration parameters.
*
* @author Gaël L'hopital - Initial contribution
*/
@NonNullByDefault
public class WorxLandroidConfiguration {
/**
* Sample configuration parameters. Replace with your own.
*/
public String hostname = "";
public String password = "";
public int refreshInterval = 600;
}

View File

@ -80,7 +80,7 @@ public class WorxLandroidIconProvider implements IconProvider {
@Override
public @Nullable Integer hasIcon(String category, String iconSetId, Format format) {
return /* ICONS.contains(category) && */ iconSetId.equals(BINDING_ID) && format == Format.SVG ? 0 : null;
return iconSetId.equals(BINDING_ID) && format == Format.SVG ? 0 : null;
}
public @Nullable InputStream getIcon(String category, String state) {

View File

@ -63,9 +63,6 @@ public enum WorxLandroidStatusCodes {
SEARCHING_ZONE,
@SerializedName("34")
PAUSE,
// Issue #91
// @SerializedName("97")
// ZONE_TRAINING,
@SerializedName("99")
MANUEL_STOP;
}

View File

@ -90,12 +90,6 @@ public class Mower {
return timeExtension;
}
public Double getFirmwareVersionAsDouble() {
// Most of the time it is xx.y but also seen xx.y.z+1 we'll keep only the beginning
String[] versionParts = getFirmwareVersion().split("\\.");
return Double.valueOf("%s.%s".formatted(versionParts[0], versionParts[1]));
}
public String getFirmwareVersion() {
return product.firmwareVersion;
}