mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 07:02:02 +01:00
Bump spotless to 2.35 and Eclipse Java Formatter to 4.26 (#14645)
Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
parent
b47a205f44
commit
8e902f6324
@ -216,7 +216,7 @@ public class FloureonThermostatHandler extends BroadlinkBaseHandler {
|
||||
try {
|
||||
new SetTimeCommand(tob(zonedDateTime.getHour()), tob(zonedDateTime.getMinute()),
|
||||
tob(zonedDateTime.getSecond()), tob(zonedDateTime.getDayOfWeek().getValue()))
|
||||
.execute(floureonDevice);
|
||||
.execute(floureonDevice);
|
||||
} catch (Exception e) {
|
||||
logger.warn("Error while setting time of {} to {}: {}", thing.getUID(), command, e.getMessage());
|
||||
}
|
||||
|
@ -137,10 +137,10 @@ public class SensorThermostatThingHandler extends SensorBaseThingHandler {
|
||||
String mode = thermostatMode != null ? thermostatMode.name() : ThermostatMode.UNKNOWN.name();
|
||||
switch (channelUID.getId()) {
|
||||
case CHANNEL_THERMOSTAT_LOCKED -> updateSwitchChannel(channelUID, newConfig.locked);
|
||||
case CHANNEL_HEATSETPOINT -> updateQuantityTypeChannel(channelUID, newConfig.heatsetpoint, CELSIUS,
|
||||
1.0 / 100);
|
||||
case CHANNEL_TEMPERATURE_OFFSET -> updateQuantityTypeChannel(channelUID, newConfig.offset, CELSIUS,
|
||||
1.0 / 100);
|
||||
case CHANNEL_HEATSETPOINT ->
|
||||
updateQuantityTypeChannel(channelUID, newConfig.heatsetpoint, CELSIUS, 1.0 / 100);
|
||||
case CHANNEL_TEMPERATURE_OFFSET ->
|
||||
updateQuantityTypeChannel(channelUID, newConfig.offset, CELSIUS, 1.0 / 100);
|
||||
case CHANNEL_THERMOSTAT_MODE -> updateState(channelUID, new StringType(mode));
|
||||
case CHANNEL_EXTERNAL_WINDOW_OPEN -> {
|
||||
Boolean open = newConfig.externalwindowopen;
|
||||
|
@ -157,8 +157,8 @@ public class SensorThingHandler extends SensorBaseThingHandler {
|
||||
case CHANNEL_VIBRATION -> updateSwitchChannel(channelUID, newState.vibration);
|
||||
case CHANNEL_CARBONMONOXIDE -> updateSwitchChannel(channelUID, newState.carbonmonoxide);
|
||||
case CHANNEL_AIRQUALITY -> updateStringChannel(channelUID, newState.airquality);
|
||||
case CHANNEL_AIRQUALITYPPB -> updateQuantityTypeChannel(channelUID, newState.airqualityppb,
|
||||
PARTS_PER_BILLION);
|
||||
case CHANNEL_AIRQUALITYPPB ->
|
||||
updateQuantityTypeChannel(channelUID, newState.airqualityppb, PARTS_PER_BILLION);
|
||||
case CHANNEL_MOISTURE -> updateQuantityTypeChannel(channelUID, newState.moisture, PERCENT);
|
||||
case CHANNEL_BUTTON -> updateDecimalTypeChannel(channelUID, newState.buttonevent);
|
||||
case CHANNEL_BUTTONEVENT -> {
|
||||
|
@ -211,7 +211,7 @@ public class DiscoveryServiceManager
|
||||
if (discoveryServices.get(DsDeviceThingTypeProvider.SupportedThingTypes.circuit.toString()) != null) {
|
||||
((DeviceDiscoveryService) discoveryServices
|
||||
.get(DsDeviceThingTypeProvider.SupportedThingTypes.circuit.toString()))
|
||||
.onDeviceAdded(device);
|
||||
.onDeviceAdded(device);
|
||||
}
|
||||
}
|
||||
} catch (RuntimeException ex) {
|
||||
@ -240,7 +240,7 @@ public class DiscoveryServiceManager
|
||||
if (discoveryServices.get(DigitalSTROMBindingConstants.THING_TYPE_ZONE_TEMERATURE_CONTROL.toString()) != null) {
|
||||
((ZoneTemperatureControlDiscoveryService) discoveryServices
|
||||
.get(DigitalSTROMBindingConstants.THING_TYPE_ZONE_TEMERATURE_CONTROL.toString()))
|
||||
.configChanged(tempControlStatus);
|
||||
.configChanged(tempControlStatus);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ public class DsDeviceThingTypeProvider extends BaseDsI18n implements ThingTypePr
|
||||
thingTypeBuilder.withChannelDefinitions(Arrays.asList(new ChannelDefinitionBuilder(
|
||||
DsChannelTypeProvider.SHADE,
|
||||
new ChannelTypeUID(DigitalSTROMBindingConstants.BINDING_ID, DsChannelTypeProvider.SHADE))
|
||||
.build()));
|
||||
.build()));
|
||||
}
|
||||
if (SupportedThingTypes.circuit.equals(supportedThingType)) {
|
||||
List<ChannelDefinition> channelDefinitions = new ArrayList<>(3);
|
||||
@ -162,7 +162,8 @@ public class DsDeviceThingTypeProvider extends BaseDsI18n implements ThingTypePr
|
||||
channelDefinitions.add(new ChannelDefinitionBuilder(
|
||||
DsChannelTypeProvider.getMeteringChannelID(meteringType, MeteringUnitsEnum.WH, false),
|
||||
new ChannelTypeUID(DigitalSTROMBindingConstants.BINDING_ID, DsChannelTypeProvider
|
||||
.getMeteringChannelID(meteringType, MeteringUnitsEnum.WH, false))).build());
|
||||
.getMeteringChannelID(meteringType, MeteringUnitsEnum.WH, false)))
|
||||
.build());
|
||||
}
|
||||
thingTypeBuilder.withChannelDefinitions(channelDefinitions);
|
||||
}
|
||||
|
@ -853,7 +853,7 @@ public class ElroConnectsBridgeHandler extends BaseBridgeHandler {
|
||||
logger.debug("Sync scenes");
|
||||
ElroConnectsMessage elroMessage = new ElroConnectsMessage(msgIdIncrement(), connectorId, ctrlKey,
|
||||
ELRO_SYNC_SCENES, legacyFirmware).withSceneGroup(0).withSceneContent(SYNC_COMMAND)
|
||||
.withAnswerContent(SYNC_COMMAND);
|
||||
.withAnswerContent(SYNC_COMMAND);
|
||||
sendElroMessage(elroMessage, true);
|
||||
}
|
||||
|
||||
|
@ -106,8 +106,8 @@ public class FreeboxCommandExtension extends AbstractConsoleCommandExtension imp
|
||||
if (cursorArgumentIndex <= 0) {
|
||||
return new StringsCompleter(thingRegistry.getAll().stream()
|
||||
.filter(t -> FreeboxBindingConstants.FREEBOX_BRIDGE_TYPE_SERVER.equals(t.getThingTypeUID()))
|
||||
.map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args,
|
||||
cursorArgumentIndex, cursorPosition, candidates);
|
||||
.map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true)
|
||||
.complete(args, cursorArgumentIndex, cursorPosition, candidates);
|
||||
} else if (cursorArgumentIndex == 1) {
|
||||
Thing thing = getThing(args[0]);
|
||||
if (thing != null && FreeboxBindingConstants.FREEBOX_BRIDGE_TYPE_SERVER.equals(thing.getThingTypeUID())) {
|
||||
|
@ -127,8 +127,8 @@ public class HueCommandExtension extends AbstractConsoleCommandExtension impleme
|
||||
return new StringsCompleter(thingRegistry.getAll().stream()
|
||||
.filter(t -> HueBindingConstants.THING_TYPE_BRIDGE.equals(t.getThingTypeUID())
|
||||
|| HueBindingConstants.THING_TYPE_GROUP.equals(t.getThingTypeUID()))
|
||||
.map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args,
|
||||
cursorArgumentIndex, cursorPosition, candidates);
|
||||
.map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true)
|
||||
.complete(args, cursorArgumentIndex, cursorPosition, candidates);
|
||||
} else if (cursorArgumentIndex == 1) {
|
||||
Thing thing = getThing(args[0]);
|
||||
if (thing != null && HueBindingConstants.THING_TYPE_BRIDGE.equals(thing.getThingTypeUID())) {
|
||||
|
@ -354,7 +354,7 @@ public class DeviceThingHandler extends BaseThingHandler implements GroupAddress
|
||||
}
|
||||
frequency = ((BigDecimal) Objects.requireNonNullElse(
|
||||
channel.getConfiguration().get(KNXBindingConstants.REPEAT_FREQUENCY), BigDecimal.ZERO))
|
||||
.intValue();
|
||||
.intValue();
|
||||
} else {
|
||||
// disable dimming by binding
|
||||
frequency = 0;
|
||||
|
@ -139,9 +139,9 @@ import com.google.gson.stream.MalformedJsonException;
|
||||
*
|
||||
* <pre>
|
||||
* {@code
|
||||
* shapeAdapter.registerSubtype(Rectangle.class, "Rectangle");
|
||||
* shapeAdapter.registerSubtype(Circle.class, "Circle");
|
||||
* shapeAdapter.registerSubtype(Diamond.class, "Diamond");
|
||||
* shapeAdapter.registerSubtype(Rectangle.class, "Rectangle");
|
||||
* shapeAdapter.registerSubtype(Circle.class, "Circle");
|
||||
* shapeAdapter.registerSubtype(Diamond.class, "Diamond");
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
|
@ -116,8 +116,8 @@ public class LGWebOSCommandExtension extends AbstractConsoleCommandExtension imp
|
||||
if (cursorArgumentIndex <= 0) {
|
||||
return new StringsCompleter(thingRegistry.getAll().stream()
|
||||
.filter(t -> LGWebOSBindingConstants.THING_TYPE_WEBOSTV.equals(t.getThingTypeUID()))
|
||||
.map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args,
|
||||
cursorArgumentIndex, cursorPosition, candidates);
|
||||
.map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true)
|
||||
.complete(args, cursorArgumentIndex, cursorPosition, candidates);
|
||||
} else if (cursorArgumentIndex == 1) {
|
||||
Thing thing = getThing(args[0]);
|
||||
if (thing != null && LGWebOSBindingConstants.THING_TYPE_WEBOSTV.equals(thing.getThingTypeUID())) {
|
||||
|
@ -140,8 +140,8 @@ public class LinkyCommandExtension extends AbstractConsoleCommandExtension imple
|
||||
if (cursorArgumentIndex <= 0) {
|
||||
return new StringsCompleter(thingRegistry.getAll().stream()
|
||||
.filter(t -> LinkyBindingConstants.THING_TYPE_LINKY.equals(t.getThingTypeUID()))
|
||||
.map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args,
|
||||
cursorArgumentIndex, cursorPosition, candidates);
|
||||
.map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true)
|
||||
.complete(args, cursorArgumentIndex, cursorPosition, candidates);
|
||||
} else if (cursorArgumentIndex == 1) {
|
||||
Thing thing = getThing(args[0]);
|
||||
if (thing != null && LinkyBindingConstants.THING_TYPE_LINKY.equals(thing.getThingTypeUID())) {
|
||||
|
@ -76,27 +76,24 @@ public class AlarmControlPanel extends AbstractComponent<AlarmControlPanel.Chann
|
||||
channelConfiguration.stateTriggered };
|
||||
buildChannel(STATE_CHANNEL_ID, new TextValue(stateEnum), channelConfiguration.getName(),
|
||||
componentConfiguration.getUpdateListener())
|
||||
.stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())//
|
||||
.build();
|
||||
.stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())//
|
||||
.build();
|
||||
|
||||
String commandTopic = channelConfiguration.commandTopic;
|
||||
if (commandTopic != null) {
|
||||
buildChannel(SWITCH_DISARM_CHANNEL_ID, new TextValue(new String[] { channelConfiguration.payloadDisarm }),
|
||||
channelConfiguration.getName(), componentConfiguration.getUpdateListener())
|
||||
.commandTopic(commandTopic, channelConfiguration.isRetain(), channelConfiguration.getQos())
|
||||
.build();
|
||||
.commandTopic(commandTopic, channelConfiguration.isRetain(), channelConfiguration.getQos()).build();
|
||||
|
||||
buildChannel(SWITCH_ARM_HOME_CHANNEL_ID,
|
||||
new TextValue(new String[] { channelConfiguration.payloadArmHome }), channelConfiguration.getName(),
|
||||
componentConfiguration.getUpdateListener())
|
||||
.commandTopic(commandTopic, channelConfiguration.isRetain(), channelConfiguration.getQos())
|
||||
.build();
|
||||
.commandTopic(commandTopic, channelConfiguration.isRetain(), channelConfiguration.getQos()).build();
|
||||
|
||||
buildChannel(SWITCH_ARM_AWAY_CHANNEL_ID,
|
||||
new TextValue(new String[] { channelConfiguration.payloadArmAway }), channelConfiguration.getName(),
|
||||
componentConfiguration.getUpdateListener())
|
||||
.commandTopic(commandTopic, channelConfiguration.isRetain(), channelConfiguration.getQos())
|
||||
.build();
|
||||
.commandTopic(commandTopic, channelConfiguration.isRetain(), channelConfiguration.getQos()).build();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public class ComponentFactory {
|
||||
Gson gson, TransformationServiceProvider transformationServiceProvider) throws ConfigurationException {
|
||||
ComponentConfiguration componentConfiguration = new ComponentConfiguration(thingUID, haID,
|
||||
channelConfigurationJSON, gson, updateListener, tracker, scheduler)
|
||||
.transformationProvider(transformationServiceProvider);
|
||||
.transformationProvider(transformationServiceProvider);
|
||||
switch (haID.component) {
|
||||
case "alarm_control_panel":
|
||||
return new AlarmControlPanel(componentConfiguration);
|
||||
|
@ -58,9 +58,9 @@ public class Cover extends AbstractComponent<Cover.ChannelConfiguration> {
|
||||
|
||||
buildChannel(SWITCH_CHANNEL_ID, value, channelConfiguration.getName(),
|
||||
componentConfiguration.getUpdateListener())
|
||||
.stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
|
||||
.commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos())
|
||||
.build();
|
||||
.stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
|
||||
.commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
@ -71,11 +71,10 @@ public class DefaultSchemaLight extends Light {
|
||||
if (channelConfiguration.brightnessStateTopic != null || channelConfiguration.brightnessCommandTopic != null) {
|
||||
localBrightnessChannel = brightnessChannel = buildChannel(BRIGHTNESS_CHANNEL_ID, brightnessValue,
|
||||
"Brightness", this)
|
||||
.stateTopic(channelConfiguration.brightnessStateTopic,
|
||||
channelConfiguration.brightnessValueTemplate)
|
||||
.commandTopic(channelConfiguration.brightnessCommandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos())
|
||||
.withFormat("%.0f").commandFilter(this::handleBrightnessCommand).build(false);
|
||||
.stateTopic(channelConfiguration.brightnessStateTopic, channelConfiguration.brightnessValueTemplate)
|
||||
.commandTopic(channelConfiguration.brightnessCommandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos())
|
||||
.withFormat("%.0f").commandFilter(this::handleBrightnessCommand).build(false);
|
||||
}
|
||||
|
||||
if (channelConfiguration.whiteCommandTopic != null) {
|
||||
@ -111,10 +110,10 @@ public class DefaultSchemaLight extends Light {
|
||||
hasColorChannel = true;
|
||||
hiddenChannels.add(rgbChannel = buildChannel(RGB_CHANNEL_ID, new ColorValue(ColorMode.RGB, null, null, 100),
|
||||
"RGB state", this)
|
||||
.stateTopic(channelConfiguration.rgbStateTopic, channelConfiguration.rgbValueTemplate)
|
||||
.commandTopic(channelConfiguration.rgbCommandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos())
|
||||
.build(false));
|
||||
.stateTopic(channelConfiguration.rgbStateTopic, channelConfiguration.rgbValueTemplate)
|
||||
.commandTopic(channelConfiguration.rgbCommandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos())
|
||||
.build(false));
|
||||
}
|
||||
|
||||
if (channelConfiguration.rgbwStateTopic != null || channelConfiguration.rgbwCommandTopic != null) {
|
||||
@ -140,9 +139,9 @@ public class DefaultSchemaLight extends Light {
|
||||
hiddenChannels.add(
|
||||
xyChannel = buildChannel(XY_CHANNEL_ID, new ColorValue(ColorMode.XYY, null, null, 100), "XY State",
|
||||
this).stateTopic(channelConfiguration.xyStateTopic, channelConfiguration.xyValueTemplate)
|
||||
.commandTopic(channelConfiguration.xyCommandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos())
|
||||
.build(false));
|
||||
.commandTopic(channelConfiguration.xyCommandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos())
|
||||
.build(false));
|
||||
}
|
||||
|
||||
if (channelConfiguration.hsStateTopic != null || channelConfiguration.hsCommandTopic != null) {
|
||||
|
@ -67,7 +67,6 @@ public class DeviceTrigger extends AbstractComponent<DeviceTrigger.ChannelConfig
|
||||
|
||||
buildChannel(channelConfiguration.type, value, channelConfiguration.getName(),
|
||||
componentConfiguration.getUpdateListener())
|
||||
.stateTopic(channelConfiguration.topic, channelConfiguration.getValueTemplate()).trigger(true)
|
||||
.build();
|
||||
.stateTopic(channelConfiguration.topic, channelConfiguration.getValueTemplate()).trigger(true).build();
|
||||
}
|
||||
}
|
||||
|
@ -56,9 +56,9 @@ public class Fan extends AbstractComponent<Fan.ChannelConfiguration> {
|
||||
OnOffValue value = new OnOffValue(channelConfiguration.payloadOn, channelConfiguration.payloadOff);
|
||||
buildChannel(SWITCH_CHANNEL_ID, value, channelConfiguration.getName(),
|
||||
componentConfiguration.getUpdateListener())
|
||||
.stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
|
||||
.commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos(), channelConfiguration.commandTemplate)
|
||||
.build();
|
||||
.stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
|
||||
.commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos(), channelConfiguration.commandTemplate)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
@ -60,9 +60,9 @@ public class Lock extends AbstractComponent<Lock.ChannelConfiguration> {
|
||||
buildChannel(SWITCH_CHANNEL_ID,
|
||||
new OnOffValue(channelConfiguration.payloadLock, channelConfiguration.payloadUnlock),
|
||||
channelConfiguration.getName(), componentConfiguration.getUpdateListener())
|
||||
.stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
|
||||
.commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos())
|
||||
.build();
|
||||
.stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
|
||||
.commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
@ -84,9 +84,9 @@ public class Number extends AbstractComponent<Number.ChannelConfiguration> {
|
||||
|
||||
buildChannel(NUMBER_CHANNEL_ID, value, channelConfiguration.getName(),
|
||||
componentConfiguration.getUpdateListener())
|
||||
.stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
|
||||
.commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos(), channelConfiguration.commandTemplate)
|
||||
.build();
|
||||
.stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
|
||||
.commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos(), channelConfiguration.commandTemplate)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
@ -68,9 +68,9 @@ public class Select extends AbstractComponent<Select.ChannelConfiguration> {
|
||||
|
||||
buildChannel(SELECT_CHANNEL_ID, value, channelConfiguration.getName(),
|
||||
componentConfiguration.getUpdateListener())
|
||||
.stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
|
||||
.commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos(), channelConfiguration.commandTemplate)
|
||||
.build();
|
||||
.stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())
|
||||
.commandTopic(channelConfiguration.commandTopic, channelConfiguration.isRetain(),
|
||||
channelConfiguration.getQos(), channelConfiguration.commandTemplate)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
@ -90,8 +90,8 @@ public class Sensor extends AbstractComponent<Sensor.ChannelConfiguration> {
|
||||
|
||||
buildChannel(SENSOR_CHANNEL_ID, value, channelConfiguration.getName(),
|
||||
getListener(componentConfiguration, value))
|
||||
.stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())//
|
||||
.trigger(trigger).build();
|
||||
.stateTopic(channelConfiguration.stateTopic, channelConfiguration.getValueTemplate())//
|
||||
.trigger(trigger).build();
|
||||
}
|
||||
|
||||
private ChannelStateUpdateListener getListener(ComponentFactory.ComponentConfiguration componentConfiguration,
|
||||
|
@ -227,8 +227,8 @@ public class AdvancedMultisensorThingHandler extends OwBaseThingHandler {
|
||||
properties.put(PROPERTY_DS2438,
|
||||
ds2438configuration.getAssociatedSensorIds(OwSensorType.MS_TV).get(0).getFullPath());
|
||||
}
|
||||
default -> throw new OwException(
|
||||
"sensorType " + sensorType.toString() + " not supported by this thing handler");
|
||||
default ->
|
||||
throw new OwException("sensorType " + sensorType.toString() + " not supported by this thing handler");
|
||||
}
|
||||
|
||||
updateProperties(properties);
|
||||
|
@ -69,7 +69,7 @@ public class PilightConnector implements Runnable, Closeable {
|
||||
|
||||
private final ObjectMapper outputMapper = new ObjectMapper(
|
||||
new MappingJsonFactory().configure(JsonParser.Feature.AUTO_CLOSE_SOURCE, false))
|
||||
.setDefaultPropertyInclusion(JsonInclude.Include.NON_NULL);
|
||||
.setDefaultPropertyInclusion(JsonInclude.Include.NON_NULL);
|
||||
|
||||
private @Nullable Socket socket;
|
||||
private @Nullable PrintStream printStream;
|
||||
|
@ -126,8 +126,8 @@ public class PowermaxCommandExtension extends AbstractConsoleCommandExtension im
|
||||
return new StringsCompleter(thingRegistry.getAll().stream()
|
||||
.filter(t -> PowermaxBindingConstants.BRIDGE_TYPE_SERIAL.equals(t.getThingTypeUID())
|
||||
|| PowermaxBindingConstants.BRIDGE_TYPE_IP.equals(t.getThingTypeUID()))
|
||||
.map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args,
|
||||
cursorArgumentIndex, cursorPosition, candidates);
|
||||
.map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true)
|
||||
.complete(args, cursorArgumentIndex, cursorPosition, candidates);
|
||||
} else if (cursorArgumentIndex == 1) {
|
||||
Thing thing = getThing(args[0]);
|
||||
if (thing != null && (PowermaxBindingConstants.BRIDGE_TYPE_SERIAL.equals(thing.getThingTypeUID())
|
||||
|
@ -77,7 +77,7 @@ public class TestMeterReading {
|
||||
try {
|
||||
verify(changeListener, after(
|
||||
period.toMillis() + 2 * period.toMillis() * ConnectorBase.NUMBER_OF_RETRIES + period.toMillis() / 2)
|
||||
.times(1)).errorOccurred(any());
|
||||
.times(1)).errorOccurred(any());
|
||||
verify(connector, times(ConnectorBase.NUMBER_OF_RETRIES)).retryHook(ArgumentMatchers.anyInt());
|
||||
} finally {
|
||||
disposable.dispose();
|
||||
|
@ -103,8 +103,8 @@ public class SomfyTahomaCommandExtension extends AbstractConsoleCommandExtension
|
||||
if (cursorArgumentIndex <= 0) {
|
||||
return new StringsCompleter(thingRegistry.getAll().stream()
|
||||
.filter(t -> SomfyTahomaBindingConstants.THING_TYPE_BRIDGE.equals(t.getThingTypeUID()))
|
||||
.map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true).complete(args,
|
||||
cursorArgumentIndex, cursorPosition, candidates);
|
||||
.map(t -> t.getUID().getAsString()).collect(Collectors.toList()), true)
|
||||
.complete(args, cursorArgumentIndex, cursorPosition, candidates);
|
||||
} else if (cursorArgumentIndex == 1) {
|
||||
Thing thing = getThing(args[0]);
|
||||
if (thing != null && SomfyTahomaBindingConstants.THING_TYPE_BRIDGE.equals(thing.getThingTypeUID())) {
|
||||
|
@ -355,7 +355,7 @@ public class SCrunProductCommand extends RunProductCommand implements SlipBridge
|
||||
// create notification product that clones the new command positions
|
||||
product = new VeluxProduct(VeluxProductName.UNKNOWN, new ProductBridgeIndex(reqIndexArray01),
|
||||
ProductState.EXECUTING.value, setMainParameter, setMainParameter, reqFunctionalParameters, COMMAND)
|
||||
.overrideDataSource(DataSource.BINDING);
|
||||
.overrideDataSource(DataSource.BINDING);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class HomekitHeaterCoolerImpl extends AbstractHomekitAccessoryImpl implem
|
||||
: getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MIN_VALUE,
|
||||
BigDecimal.valueOf(HomekitCharacteristicFactory
|
||||
.convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MIN_VALUE)))
|
||||
.doubleValue());
|
||||
.doubleValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,7 +61,7 @@ class HomekitTemperatureSensorImpl extends AbstractHomekitAccessoryImpl implemen
|
||||
getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MIN_VALUE,
|
||||
BigDecimal.valueOf(HomekitCharacteristicFactory
|
||||
.convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MIN_VALUE)))
|
||||
.doubleValue());
|
||||
.doubleValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -70,7 +70,7 @@ class HomekitTemperatureSensorImpl extends AbstractHomekitAccessoryImpl implemen
|
||||
getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MAX_VALUE,
|
||||
BigDecimal.valueOf(HomekitCharacteristicFactory
|
||||
.convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MAX_VALUE)))
|
||||
.doubleValue());
|
||||
.doubleValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -120,7 +120,7 @@ class HomekitThermostatImpl extends AbstractHomekitAccessoryImpl implements Ther
|
||||
getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MIN_VALUE,
|
||||
BigDecimal.valueOf(HomekitCharacteristicFactory
|
||||
.convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MIN_VALUE)))
|
||||
.doubleValue());
|
||||
.doubleValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -129,7 +129,7 @@ class HomekitThermostatImpl extends AbstractHomekitAccessoryImpl implements Ther
|
||||
getAccessoryConfiguration(HomekitCharacteristicType.CURRENT_TEMPERATURE, HomekitTaggedItem.MAX_VALUE,
|
||||
BigDecimal.valueOf(HomekitCharacteristicFactory
|
||||
.convertFromCelsius(CurrentTemperatureCharacteristic.DEFAULT_MAX_VALUE)))
|
||||
.doubleValue());
|
||||
.doubleValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -189,7 +189,7 @@ class HomekitThermostatImpl extends AbstractHomekitAccessoryImpl implements Ther
|
||||
HomekitTaggedItem.MIN_VALUE,
|
||||
BigDecimal.valueOf(HomekitCharacteristicFactory
|
||||
.convertFromCelsius(TargetTemperatureCharacteristic.DEFAULT_MIN_VALUE)))
|
||||
.doubleValue());
|
||||
.doubleValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -200,7 +200,7 @@ class HomekitThermostatImpl extends AbstractHomekitAccessoryImpl implements Ther
|
||||
HomekitTaggedItem.MAX_VALUE,
|
||||
BigDecimal.valueOf(HomekitCharacteristicFactory
|
||||
.convertFromCelsius(TargetTemperatureCharacteristic.DEFAULT_MAX_VALUE)))
|
||||
.doubleValue());
|
||||
.doubleValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -33,19 +33,19 @@ public class DynamoDBBigDecimalItem extends AbstractDynamoDBItem<BigDecimal> {
|
||||
|
||||
public static StaticTableSchema<DynamoDBBigDecimalItem> TABLE_SCHEMA_LEGACY = getBaseSchemaBuilder(
|
||||
DynamoDBBigDecimalItem.class, true).newItemSupplier(DynamoDBBigDecimalItem::new)
|
||||
.addAttribute(NULLABLE_BIGDECIMAL, a -> a.name(ATTRIBUTE_NAME_ITEMSTATE_LEGACY)
|
||||
.getter(DynamoDBBigDecimalItem::getState).setter(DynamoDBBigDecimalItem::setState))
|
||||
.build();
|
||||
.addAttribute(NULLABLE_BIGDECIMAL, a -> a.name(ATTRIBUTE_NAME_ITEMSTATE_LEGACY)
|
||||
.getter(DynamoDBBigDecimalItem::getState).setter(DynamoDBBigDecimalItem::setState))
|
||||
.build();
|
||||
|
||||
public static StaticTableSchema<DynamoDBBigDecimalItem> TABLE_SCHEMA_NEW = getBaseSchemaBuilder(
|
||||
DynamoDBBigDecimalItem.class, false)
|
||||
.newItemSupplier(DynamoDBBigDecimalItem::new)
|
||||
.addAttribute(NULLABLE_BIGDECIMAL,
|
||||
a -> a.name(ATTRIBUTE_NAME_ITEMSTATE_NUMBER).getter(DynamoDBBigDecimalItem::getState)
|
||||
.setter(DynamoDBBigDecimalItem::setState))
|
||||
.addAttribute(NULLABLE_LONG, a -> a.name(ATTRIBUTE_NAME_EXPIRY)
|
||||
.getter(AbstractDynamoDBItem::getExpiryDate).setter(AbstractDynamoDBItem::setExpiry))
|
||||
.build();
|
||||
.newItemSupplier(DynamoDBBigDecimalItem::new)
|
||||
.addAttribute(NULLABLE_BIGDECIMAL,
|
||||
a -> a.name(ATTRIBUTE_NAME_ITEMSTATE_NUMBER).getter(DynamoDBBigDecimalItem::getState)
|
||||
.setter(DynamoDBBigDecimalItem::setState))
|
||||
.addAttribute(NULLABLE_LONG, a -> a.name(ATTRIBUTE_NAME_EXPIRY).getter(AbstractDynamoDBItem::getExpiryDate)
|
||||
.setter(AbstractDynamoDBItem::setExpiry))
|
||||
.build();
|
||||
|
||||
/**
|
||||
* We get the following error if the BigDecimal has too many digits
|
||||
|
@ -30,22 +30,20 @@ public class DynamoDBStringItem extends AbstractDynamoDBItem<String> {
|
||||
private static Class<@Nullable String> NULLABLE_STRING = (Class<@Nullable String>) String.class;
|
||||
|
||||
public static final StaticTableSchema<DynamoDBStringItem> TABLE_SCHEMA_LEGACY = getBaseSchemaBuilder(
|
||||
DynamoDBStringItem.class, true)
|
||||
.newItemSupplier(
|
||||
DynamoDBStringItem::new)
|
||||
.addAttribute(NULLABLE_STRING, a -> a.name(DynamoDBItem.ATTRIBUTE_NAME_ITEMSTATE_LEGACY)
|
||||
.getter(DynamoDBStringItem::getState).setter(DynamoDBStringItem::setState))
|
||||
.build();
|
||||
DynamoDBStringItem.class, true).newItemSupplier(DynamoDBStringItem::new)
|
||||
.addAttribute(NULLABLE_STRING, a -> a.name(DynamoDBItem.ATTRIBUTE_NAME_ITEMSTATE_LEGACY)
|
||||
.getter(DynamoDBStringItem::getState).setter(DynamoDBStringItem::setState))
|
||||
.build();
|
||||
|
||||
public static final StaticTableSchema<DynamoDBStringItem> TABLE_SCHEMA_NEW = getBaseSchemaBuilder(
|
||||
DynamoDBStringItem.class, false)
|
||||
.newItemSupplier(DynamoDBStringItem::new)
|
||||
.addAttribute(NULLABLE_STRING,
|
||||
a -> a.name(DynamoDBItem.ATTRIBUTE_NAME_ITEMSTATE_STRING)
|
||||
.getter(DynamoDBStringItem::getState).setter(DynamoDBStringItem::setState))
|
||||
.addAttribute(NULLABLE_LONG, a -> a.name(ATTRIBUTE_NAME_EXPIRY)
|
||||
.getter(AbstractDynamoDBItem::getExpiryDate).setter(AbstractDynamoDBItem::setExpiry))
|
||||
.build();
|
||||
.newItemSupplier(DynamoDBStringItem::new)
|
||||
.addAttribute(NULLABLE_STRING,
|
||||
a -> a.name(DynamoDBItem.ATTRIBUTE_NAME_ITEMSTATE_STRING).getter(DynamoDBStringItem::getState)
|
||||
.setter(DynamoDBStringItem::setState))
|
||||
.addAttribute(NULLABLE_LONG, a -> a.name(ATTRIBUTE_NAME_EXPIRY).getter(AbstractDynamoDBItem::getExpiryDate)
|
||||
.setter(AbstractDynamoDBItem::setExpiry))
|
||||
.build();
|
||||
|
||||
public DynamoDBStringItem() {
|
||||
this("", null, ZonedDateTime.now(), null);
|
||||
|
@ -63,7 +63,7 @@ import com.igormaznitsa.jbbp.model.JBBPFieldUShort;
|
||||
* <pre>
|
||||
* {@code
|
||||
* JsonObject json = new Bin2Json("byte a; byte b; ubyte c;").convert("03FAFF");
|
||||
* json.toString() = {"a":3,"b":-6,"c":255}
|
||||
* json.toString() = {"a":3,"b":-6,"c":255}}
|
||||
* </pre>
|
||||
*
|
||||
* @author Pauli Anttila - Initial contribution
|
||||
|
@ -170,7 +170,7 @@ public abstract class AbstractMieleThingHandlerTest extends JavaOSGiTest {
|
||||
OAuthFactory oAuthFactory = mock(OAuthFactory.class);
|
||||
when(oAuthFactory
|
||||
.getOAuthClientService(MieleCloudBindingIntegrationTestConstants.BRIDGE_THING_UID.getAsString()))
|
||||
.thenReturn(oAuthClientService);
|
||||
.thenReturn(oAuthClientService);
|
||||
|
||||
OpenHabOAuthTokenRefresher tokenRefresher = getService(OAuthTokenRefresher.class,
|
||||
OpenHabOAuthTokenRefresher.class);
|
||||
|
11
pom.xml
11
pom.xml
@ -77,8 +77,9 @@
|
||||
<netty.version>4.1.72.Final</netty.version>
|
||||
<okhttp.version>3.14.9</okhttp.version>
|
||||
<sat.version>0.13.0</sat.version>
|
||||
<spotless.version>2.28.0</spotless.version>
|
||||
<spotless.eclipse.version>4.21.0</spotless.eclipse.version>
|
||||
<spotless.version>2.35.0</spotless.version>
|
||||
<spotless.eclipse.version>4.26</spotless.eclipse.version>
|
||||
<spotless.eclipse.wtp.version>4.21.0</spotless.eclipse.wtp.version>
|
||||
|
||||
<bnd.importpackage/>
|
||||
<bnd.exportpackage/>
|
||||
@ -521,7 +522,7 @@ Import-Package: \\
|
||||
<files>
|
||||
<file>openhab_wst_xml_files.prefs</file>
|
||||
</files>
|
||||
<version>${spotless.eclipse.version}</version>
|
||||
<version>${spotless.eclipse.wtp.version}</version>
|
||||
</eclipseWtp>
|
||||
<trimTrailingWhitespace/>
|
||||
<endWithNewline/>
|
||||
@ -536,7 +537,7 @@ Import-Package: \\
|
||||
<files>
|
||||
<file>openhab_wst_feature_file.prefs</file>
|
||||
</files>
|
||||
<version>${spotless.eclipse.version}</version>
|
||||
<version>${spotless.eclipse.wtp.version}</version>
|
||||
</eclipseWtp>
|
||||
<trimTrailingWhitespace/>
|
||||
<endWithNewline/>
|
||||
@ -551,7 +552,7 @@ Import-Package: \\
|
||||
<files>
|
||||
<file>openhab_wst_pom_file.prefs</file>
|
||||
</files>
|
||||
<version>${spotless.eclipse.version}</version>
|
||||
<version>${spotless.eclipse.wtp.version}</version>
|
||||
</eclipseWtp>
|
||||
<trimTrailingWhitespace/>
|
||||
<endWithNewline/>
|
||||
|
Loading…
Reference in New Issue
Block a user