]> git.basschouten.com Git - openhab-addons.git/commitdiff
[robonect] improve jobType config (#14868)
authorChristian Jonak-Möchel <christian@jonak.org>
Sat, 22 Apr 2023 19:52:16 +0000 (21:52 +0200)
committerGitHub <noreply@github.com>
Sat, 22 Apr 2023 19:52:16 +0000 (21:52 +0200)
* Add allowed pattern to description
* Increase allowed duration to 12h - thats what the web gui allows

Signed-off-by: Christian Jonak-Möchel <christian@jonak.org>
bundles/org.openhab.binding.robonect/src/main/resources/OH-INF/config/config.xml
bundles/org.openhab.binding.robonect/src/main/resources/OH-INF/i18n/robonect.properties

index 9905cf2c66f55e0c724e05349545f4e34f8c2a26..06620f9da39b40bdadc0bcfc6c506021017d0f65 100644 (file)
@@ -6,19 +6,32 @@
        https://openhab.org/schemas/config-description-1.0.0.xsd">
 
        <config-description uri="channel-type:robonect:jobType">
-               <parameter name="remoteStart" type="text" pattern="^STANDARD|REMOTE_1|REMOTE_2$">
+               <parameter name="remoteStart" type="text">
                        <label>Remote Start</label>
                        <description>The location to start the mowing job from.</description>
+                       <options>
+                               <option value="STANDARD">Standard</option>
+                               <option value="REMOTE_1">Remote 1</option>
+                               <option value="REMOTE_2">Remote 2</option>
+                       </options>
+
                </parameter>
-               <parameter name="duration" type="integer" min="0" max="60" unit="m">
+               <parameter name="duration" type="integer" min="0" max="720" unit="m">
                        <context>time</context>
                        <label>Job Duration</label>
                        <description>The duration of the job.</description>
                        <default>0</default>
+
                </parameter>
-               <parameter name="afterMode" type="text" pattern="^AUTO|HOME|EOD$">
+               <parameter name="afterMode" type="text">
                        <label>After Job Mode</label>
                        <description>The Mode to put the mower into after the job is done.</description>
+                       <options>
+                               <option value="AUTO">Auto</option>
+                               <option value="HOME">Home</option>
+                               <option value="EOD">End of day</option>
+                       </options>
+
                </parameter>
        </config-description>
 
index 533ba3abd1939492bf05aadc24db4fa08c32cf07..0c482600c8c511cf74c6b65bc31f8043b31bd17d 100644 (file)
@@ -89,7 +89,13 @@ channel-type.robonect.versionType.label = Robonect Version
 
 channel-type.config.robonect.jobType.afterMode.label = After Job Mode
 channel-type.config.robonect.jobType.afterMode.description = The Mode to put the mower into after the job is done.
+channel-type.config.robonect.jobType.afterMode.option.AUTO = Auto
+channel-type.config.robonect.jobType.afterMode.option.HOME = Home
+channel-type.config.robonect.jobType.afterMode.option.EOD = End of day
 channel-type.config.robonect.jobType.duration.label = Job Duration
 channel-type.config.robonect.jobType.duration.description = The duration of the job.
 channel-type.config.robonect.jobType.remoteStart.label = Remote Start
 channel-type.config.robonect.jobType.remoteStart.description = The location to start the mowing job from.
+channel-type.config.robonect.jobType.remoteStart.option.STANDARD = Standard
+channel-type.config.robonect.jobType.remoteStart.option.REMOTE_1 = Remote 1
+channel-type.config.robonect.jobType.remoteStart.option.REMOTE_2 = Remote 2