From c016114d0039fed81cfb7d91e6d305b9f9b4e2a3 Mon Sep 17 00:00:00 2001 From: Ken Seal Date: Sun, 11 Jun 2023 03:16:13 -0700 Subject: [PATCH] [opengarage] Add vehicle status not available. (#15080) Signed-off-by: Ken Seal Signed-off-by: Thomas Burri --- .../binding/opengarage/internal/OpenGarageHandler.java | 4 ++++ .../src/main/resources/OH-INF/i18n/opengarage.properties | 1 + .../src/main/resources/OH-INF/thing/thing-types.xml | 1 + 3 files changed, 6 insertions(+) diff --git a/bundles/org.openhab.binding.opengarage/src/main/java/org/openhab/binding/opengarage/internal/OpenGarageHandler.java b/bundles/org.openhab.binding.opengarage/src/main/java/org/openhab/binding/opengarage/internal/OpenGarageHandler.java index 05350d27bedd7..ce0ca8752cb9d 100644 --- a/bundles/org.openhab.binding.opengarage/src/main/java/org/openhab/binding/opengarage/internal/OpenGarageHandler.java +++ b/bundles/org.openhab.binding.opengarage/src/main/java/org/openhab/binding/opengarage/internal/OpenGarageHandler.java @@ -174,6 +174,10 @@ private void pollStatus() throws IOException { updateState(OpenGarageBindingConstants.CHANNEL_OG_VEHICLE, new StringType("Vehicle status unknown")); break; + case 3: + updateState(OpenGarageBindingConstants.CHANNEL_OG_VEHICLE, + new StringType("Vehicle status not available")); + break; default: logger.warn("Received unknown vehicle value: {}", controllerVariables.vehicle); } diff --git a/bundles/org.openhab.binding.opengarage/src/main/resources/OH-INF/i18n/opengarage.properties b/bundles/org.openhab.binding.opengarage/src/main/resources/OH-INF/i18n/opengarage.properties index 6ca7c0dca7ba6..a83666c9ce9a7 100644 --- a/bundles/org.openhab.binding.opengarage/src/main/resources/OH-INF/i18n/opengarage.properties +++ b/bundles/org.openhab.binding.opengarage/src/main/resources/OH-INF/i18n/opengarage.properties @@ -36,6 +36,7 @@ channel-type.opengarage.opengarage-vehicle-status.description = Vehicle presence channel-type.opengarage.opengarage-vehicle-status.state.option.0 = No vehicle detected channel-type.opengarage.opengarage-vehicle-status.state.option.1 = Vehicle detected channel-type.opengarage.opengarage-vehicle-status.state.option.2 = Vehicle status unknown +channel-type.opengarage.opengarage-vehicle-status.state.option.3 = Vehicle status not available channel-type.opengarage.opengarage-vehicle.label = Vehicle Presence channel-type.opengarage.opengarage-vehicle.description = Is a vehicle present or not (now deprecated, use vehicle-status instead) diff --git a/bundles/org.openhab.binding.opengarage/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.opengarage/src/main/resources/OH-INF/thing/thing-types.xml index b8f877d28f044..9395f6f0cdb08 100644 --- a/bundles/org.openhab.binding.opengarage/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.opengarage/src/main/resources/OH-INF/thing/thing-types.xml @@ -109,6 +109,7 @@ +