From e27308b35e6cd4e359d62c5a273a107d0a3133fc Mon Sep 17 00:00:00 2001 From: Matthew Skinner Date: Sun, 9 Jan 2022 08:57:23 +1100 Subject: [PATCH] [opensprinkler] Add Veto and some default times to state options. (#11816) * Add default times to state options. Signed-off-by: Matthew Skinner * remove pattern Signed-off-by: Matthew Skinner * Update default translations properties Signed-off-by: Laurent Garnier Co-authored-by: Laurent Garnier --- .../OH-INF/i18n/opensprinkler.properties | 27 +++++++++++++ .../resources/OH-INF/thing/thing-types.xml | 38 ++++++++++++++++++- 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.opensprinkler/src/main/resources/OH-INF/i18n/opensprinkler.properties b/bundles/org.openhab.binding.opensprinkler/src/main/resources/OH-INF/i18n/opensprinkler.properties index 31a0be3cb9c17..25ce02629bac5 100644 --- a/bundles/org.openhab.binding.opensprinkler/src/main/resources/OH-INF/i18n/opensprinkler.properties +++ b/bundles/org.openhab.binding.opensprinkler/src/main/resources/OH-INF/i18n/opensprinkler.properties @@ -41,12 +41,39 @@ channel-type.opensprinkler.ignoreRain.label = Station Ignores Rain channel-type.opensprinkler.ignoreRain.description = The station will ignore forecasted rain. channel-type.opensprinkler.nextDuration.label = Next Duration channel-type.opensprinkler.nextDuration.description = The duration the station will be opened the next time it is switched on. +channel-type.opensprinkler.nextDuration.state.option.15s = 15 Seconds +channel-type.opensprinkler.nextDuration.state.option.1min = 1 Minute +channel-type.opensprinkler.nextDuration.state.option.5min = 5 Minutes +channel-type.opensprinkler.nextDuration.state.option.10min = 10 Minutes +channel-type.opensprinkler.nextDuration.state.option.15min = 15 Minutes +channel-type.opensprinkler.nextDuration.state.option.20min = 20 Minutes +channel-type.opensprinkler.nextDuration.state.option.25min = 25 Minutes +channel-type.opensprinkler.nextDuration.state.option.30min = 30 Minutes +channel-type.opensprinkler.nextDuration.state.option.40min = 40 Minutes +channel-type.opensprinkler.nextDuration.state.option.50min = 50 Minutes +channel-type.opensprinkler.nextDuration.state.option.60min = 1 Hour +channel-type.opensprinkler.nextDuration.state.option.90min = 1.5 Hours +channel-type.opensprinkler.nextDuration.state.option.2h = 2 Hours +channel-type.opensprinkler.nextDuration.state.option.3h = 3 Hours +channel-type.opensprinkler.nextDuration.state.option.4h = 4 Hours channel-type.opensprinkler.programs.label = Run Program channel-type.opensprinkler.programs.description = Run a program that is saved inside the OpenSprinkler Device. channel-type.opensprinkler.queued.label = Queued channel-type.opensprinkler.queued.description = Indicates if the station is queued to be turned on. Can be removed from the queue by turning off. ON is read-only. channel-type.opensprinkler.rainDelay.label = Rain Delay channel-type.opensprinkler.rainDelay.description = The amount of time in hours to delay the running of any program. +channel-type.opensprinkler.rainDelay.state.option.0s = Off +channel-type.opensprinkler.rainDelay.state.option.6h = 6 Hours +channel-type.opensprinkler.rainDelay.state.option.12h = 12 Hours +channel-type.opensprinkler.rainDelay.state.option.1d = 1 Day +channel-type.opensprinkler.rainDelay.state.option.2d = 2 Days +channel-type.opensprinkler.rainDelay.state.option.3d = 3 Days +channel-type.opensprinkler.rainDelay.state.option.4d = 4 Days +channel-type.opensprinkler.rainDelay.state.option.5d = 5 Days +channel-type.opensprinkler.rainDelay.state.option.6d = 6 Days +channel-type.opensprinkler.rainDelay.state.option.7d = 1 Week +channel-type.opensprinkler.rainDelay.state.option.14d = 2 Weeks +channel-type.opensprinkler.rainDelay.state.option.28d = 4 Weeks channel-type.opensprinkler.rainsensor.label = Rain Sensor channel-type.opensprinkler.rainsensor.description = Provides feedback on whether the OpenSprinkler device has detected rain or not. channel-type.opensprinkler.remainingWaterTime.label = Remaining Water Time diff --git a/bundles/org.openhab.binding.opensprinkler/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.opensprinkler/src/main/resources/OH-INF/thing/thing-types.xml index 8f7039036cce4..35e543e02998d 100644 --- a/bundles/org.openhab.binding.opensprinkler/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.opensprinkler/src/main/resources/OH-INF/thing/thing-types.xml @@ -136,6 +136,7 @@ Controls a station on the OpenSprinkler device. Switch + veto @@ -180,7 +181,25 @@ The duration the station will be opened the next time it is switched on. Time - + + + + + + + + + + + + + + + + + + + @@ -188,7 +207,22 @@ The amount of time in hours to delay the running of any program. Time - + + + + + + + + + + + + + + + +