mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[hue] Improve handling of unknown resource ID (API v2) (#16020)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
parent
d14733f100
commit
849117c7a4
@ -602,7 +602,7 @@ public class Clip2ThingHandler extends BaseThingHandler {
|
|||||||
String resourceId = config.resourceId;
|
String resourceId = config.resourceId;
|
||||||
if (resourceId.isBlank()) {
|
if (resourceId.isBlank()) {
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
|
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
|
||||||
"@text/offline.api2.conf-error.resource-id-bad");
|
"@text/offline.api2.conf-error.resource-id-missing");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
thisResource.setId(resourceId);
|
thisResource.setId(resourceId);
|
||||||
@ -700,8 +700,8 @@ public class Clip2ThingHandler extends BaseThingHandler {
|
|||||||
.ifPresentOrElse(r -> onResource(r), () -> {
|
.ifPresentOrElse(r -> onResource(r), () -> {
|
||||||
if (resourceType == thisResource.getType()) {
|
if (resourceType == thisResource.getType()) {
|
||||||
logger.debug("{} -> onResourcesList() configuration error: unknown resourceId", resourceId);
|
logger.debug("{} -> onResourcesList() configuration error: unknown resourceId", resourceId);
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
|
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.GONE,
|
||||||
"@text/offline.api2.conf-error.resource-id-bad");
|
"@text/offline.api2.gone.resource-id-unknown");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -259,8 +259,9 @@ offline.api2.conf-error.assets-not-loaded = Bridge/Thing handler assets not load
|
|||||||
offline.api2.conf-error.press-pairing-button = Not authenticated. Press pairing button on the Hue Bridge or set a valid application key in configuration.
|
offline.api2.conf-error.press-pairing-button = Not authenticated. Press pairing button on the Hue Bridge or set a valid application key in configuration.
|
||||||
offline.api2.conf-error.read-only = Configuration update failed. Please update the configuration manually.
|
offline.api2.conf-error.read-only = Configuration update failed. Please update the configuration manually.
|
||||||
offline.api2.conf-error.clip2-not-supported = The Hue Bridge does not support API v2.
|
offline.api2.conf-error.clip2-not-supported = The Hue Bridge does not support API v2.
|
||||||
offline.api2.conf-error.resource-id-bad = Configuration resourceId is bad.
|
offline.api2.conf-error.resource-id-missing = Resource ID is not configured.
|
||||||
offline.api2.conf-error.not-authorized = The application key is not authorized.
|
offline.api2.conf-error.not-authorized = The application key is not authorized.
|
||||||
|
offline.api2.gone.resource-id-unknown = Resource ID is unknown to the bridge.
|
||||||
|
|
||||||
# scene channel description
|
# scene channel description
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user