mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
Fixed build by improve config handling (#12078)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
This commit is contained in:
parent
cc437d86e2
commit
caa3359f53
@ -1039,6 +1039,8 @@ public class HueBridgeHandler extends ConfigStatusBridgeHandler implements HueCl
|
|||||||
public Collection<ConfigStatusMessage> getConfigStatus() {
|
public Collection<ConfigStatusMessage> getConfigStatus() {
|
||||||
// The bridge IP address to be used for checks
|
// The bridge IP address to be used for checks
|
||||||
// Check whether an IP address is provided
|
// Check whether an IP address is provided
|
||||||
|
hueBridgeConfig = getConfigAs(HueBridgeConfig.class);
|
||||||
|
|
||||||
String ip = hueBridgeConfig.getIpAddress();
|
String ip = hueBridgeConfig.getIpAddress();
|
||||||
if (ip == null || ip.isEmpty()) {
|
if (ip == null || ip.isEmpty()) {
|
||||||
return List.of(ConfigStatusMessage.Builder.error(HOST)
|
return List.of(ConfigStatusMessage.Builder.error(HOST)
|
||||||
|
@ -952,8 +952,8 @@ public class ModbusDataHandlerTest extends AbstractModbusOSGiTest {
|
|||||||
captureModbusWrites();
|
captureModbusWrites();
|
||||||
Configuration pollerConfig = new Configuration();
|
Configuration pollerConfig = new Configuration();
|
||||||
pollerConfig.put("refresh", 0L); // 0 -> non polling
|
pollerConfig.put("refresh", 0L); // 0 -> non polling
|
||||||
pollerConfig.put("start", "2");
|
pollerConfig.put("start", 2);
|
||||||
pollerConfig.put("length", "3");
|
pollerConfig.put("length", 3);
|
||||||
pollerConfig.put("type", ModbusBindingConstantsInternal.READ_TYPE_HOLDING_REGISTER);
|
pollerConfig.put("type", ModbusBindingConstantsInternal.READ_TYPE_HOLDING_REGISTER);
|
||||||
ThingUID pollerUID = new ThingUID(ModbusBindingConstantsInternal.THING_TYPE_MODBUS_POLLER, "realPoller");
|
ThingUID pollerUID = new ThingUID(ModbusBindingConstantsInternal.THING_TYPE_MODBUS_POLLER, "realPoller");
|
||||||
Bridge poller = BridgeBuilder.create(ModbusBindingConstantsInternal.THING_TYPE_MODBUS_POLLER, pollerUID)
|
Bridge poller = BridgeBuilder.create(ModbusBindingConstantsInternal.THING_TYPE_MODBUS_POLLER, pollerUID)
|
||||||
|
Loading…
Reference in New Issue
Block a user