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