]> git.basschouten.com Git - openhab-addons.git/commitdiff
[opensprinkler] Add Veto and some default times to state options. (#11816)
authorMatthew Skinner <matt@pcmus.com>
Sat, 8 Jan 2022 21:57:23 +0000 (08:57 +1100)
committerGitHub <noreply@github.com>
Sat, 8 Jan 2022 21:57:23 +0000 (22:57 +0100)
* Add default times to state options.

Signed-off-by: Matthew Skinner <matt@pcmus.com>
* remove pattern

Signed-off-by: Matthew Skinner <matt@pcmus.com>
* Update default translations properties

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Co-authored-by: Laurent Garnier <lg.hc@free.fr>
bundles/org.openhab.binding.opensprinkler/src/main/resources/OH-INF/i18n/opensprinkler.properties
bundles/org.openhab.binding.opensprinkler/src/main/resources/OH-INF/thing/thing-types.xml

index 31a0be3cb9c17a3850200be2003f3868e9ef4a03..25ce02629bac525c75f22f731d6a1b95a372ebef 100644 (file)
@@ -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
index 8f7039036cce415c33b1dd74a6fdd8721fb55961..35e543e02998d3552cd4125172bed4233cd5b2ba 100644 (file)
                <label>Station State</label>
                <description>Controls a station on the OpenSprinkler device.</description>
                <category>Switch</category>
+               <autoUpdatePolicy>veto</autoUpdatePolicy>
        </channel-type>
 
        <channel-type id="ignoreRain">
                <label>Next Duration</label>
                <description>The duration the station will be opened the next time it is switched on.</description>
                <category>Time</category>
-               <state readOnly="false" pattern="%.0f min"/>
+               <state>
+                       <options>
+                               <option value="15s">15 Seconds</option>
+                               <option value="1min">1 Minute</option>
+                               <option value="5min">5 Minutes</option>
+                               <option value="10min">10 Minutes</option>
+                               <option value="15min">15 Minutes</option>
+                               <option value="20min">20 Minutes</option>
+                               <option value="25min">25 Minutes</option>
+                               <option value="30min">30 Minutes</option>
+                               <option value="40min">40 Minutes</option>
+                               <option value="50min">50 Minutes</option>
+                               <option value="60min">1 Hour</option>
+                               <option value="90min">1.5 Hours</option>
+                               <option value="2h">2 Hours</option>
+                               <option value="3h">3 Hours</option>
+                               <option value="4h">4 Hours</option>
+                       </options>
+               </state>
        </channel-type>
 
        <channel-type id="rainDelay">
                <label>Rain Delay</label>
                <description>The amount of time in hours to delay the running of any program.</description>
                <category>Time</category>
-               <state readOnly="false" pattern="%.0f h"/>
+               <state readOnly="false" pattern="%.0f h">
+                       <options>
+                               <option value="0s">Off</option>
+                               <option value="6h">6 Hours</option>
+                               <option value="12h">12 Hours</option>
+                               <option value="1d">1 Day</option>
+                               <option value="2d">2 Days</option>
+                               <option value="3d">3 Days</option>
+                               <option value="4d">4 Days</option>
+                               <option value="5d">5 Days</option>
+                               <option value="6d">6 Days</option>
+                               <option value="7d">1 Week</option>
+                               <option value="14d">2 Weeks</option>
+                               <option value="28d">4 Weeks</option>
+                       </options>
+               </state>
        </channel-type>
 
        <channel-type id="programs">