]> git.basschouten.com Git - openhab-addons.git/commitdiff
[somfytahoma] Adding Moving channel to Rollershutter (#12605)
authorGaël L'hopital <gael@lhopital.org>
Tue, 19 Apr 2022 17:17:14 +0000 (19:17 +0200)
committerGitHub <noreply@github.com>
Tue, 19 Apr 2022 17:17:14 +0000 (19:17 +0200)
* Adding Moving channel to Rollershutter

Signed-off-by: clinique <gael@lhopital.org>
bundles/org.openhab.binding.somfytahoma/README.md
bundles/org.openhab.binding.somfytahoma/src/main/java/org/openhab/binding/somfytahoma/internal/SomfyTahomaBindingConstants.java
bundles/org.openhab.binding.somfytahoma/src/main/java/org/openhab/binding/somfytahoma/internal/handler/SomfyTahomaRollerShutterHandler.java
bundles/org.openhab.binding.somfytahoma/src/main/resources/OH-INF/i18n/somfytahoma.properties
bundles/org.openhab.binding.somfytahoma/src/main/resources/OH-INF/thing/channels.xml
bundles/org.openhab.binding.somfytahoma/src/main/resources/OH-INF/thing/rollershutter.xml

index 689fc84539aa871b8701f97ad89e0225f50cc935..caf52f72a583ff146751347c7e2168688a95141d 100644 (file)
@@ -73,6 +73,7 @@ Please see the example below.
 | gate                                                                               | gate_state                      | get state of your gate (open, closed, pedestrian)                                                                                                                                                                                 |
 | gate                                                                               | gate_position                   | get position (0-100%) of your gate (where supported)                                                                                                                                                                              |
 | roller shutter, shutter, screen, ven. blind, garage door, awning, pergola, curtain | control                         | device controller which reacts to commands UP/DOWN/ON/OFF/OPEN/CLOSE/MY/STOP + closure 0-100                                                                                                                                      |
+| roller shutter                                                                     | moving                          | Indicates if the device is currently operating a command                                                                                                                                                            |
 | window                                                                             | control                         | device controller which reacts to commands UP/DOWN/ON/OFF/OPEN/CLOSE/STOP + closure 0-100                                                                                                                                         |
 | silent roller shutter                                                              | silent_control                  | similar to control channel but in silent mode                                                                                                                                                                                     |
 | venetian blind, adjustable slats roller shutter, bioclimatic pergola               | orientation                     | percentual orientation of the blind's slats, it can have value 0-100. For IO Homecontrol devices only (non RTS)                                                                                                                   |
index 6e0d68b382473f1572187da07248290f43db2c83..394f18669c5e675c72d235d5762551dc66bd8605 100644 (file)
@@ -187,6 +187,7 @@ public class SomfyTahomaBindingConstants {
 
     // Roller shutter, Shutter, Awning, Screen, Blind, Garage door, Window, Curtain
     public static final String CONTROL = "control";
+    public static final String MOVING = "moving";
 
     // Adjustable slats roller shutter
     public static final String ROCKER = "rocker";
@@ -511,7 +512,9 @@ public class SomfyTahomaBindingConstants {
             THING_TYPE_HITACHI_DHW, THING_TYPE_HITACHI_ATWMC, THING_TYPE_RAINSENSOR, THING_TYPE_SHUTTER));
 
     // somfy gateways
-    public static Map<Integer, String> gatewayTypes = new HashMap<Integer, String>() {
+    public static Map<Integer, String> gatewayTypes = new HashMap<>() {
+        private static final long serialVersionUID = 7473481667820682573L;
+
         {
             put(0, "VIRTUAL_KIZBOX");
             put(2, "KIZBOX_V1");
index e6d95d7b95ae9725534ba3e47aaddf521aa5d953..edbc34d92cd3be9b64dc8bd4927bbbefd4c4768b 100644 (file)
@@ -33,6 +33,7 @@ public class SomfyTahomaRollerShutterHandler extends SomfyTahomaBaseThingHandler
     public SomfyTahomaRollerShutterHandler(Thing thing) {
         super(thing);
         stateNames.put(CONTROL, "core:ClosureState");
+        stateNames.put(MOVING, "core:MovingState");
     }
 
     @Override
index d0ee641ec1c940ba0929b18a863e180901a7dcbe..a08acf6d16386d86435232cc6a68ee2a202bad29 100644 (file)
@@ -151,6 +151,8 @@ channel-type.somfytahoma.contact.label = Contact
 channel-type.somfytahoma.contact.description = A contact having OPEN/CLOSE state
 channel-type.somfytahoma.control.label = Control
 channel-type.somfytahoma.control.description = Device control (UP, DOWN, MY/STOP, closure 0-100%)
+channel-type.somfytahoma.moving.label = Moving
+channel-type.somfytahoma.moving.description = Indicates if the device is currently operating a command
 channel-type.somfytahoma.control_silent.label = Control (silent)
 channel-type.somfytahoma.control_silent.description = Device control (UP, DOWN, MY/STOP, closure 0-100%) (only for IO devices)
 channel-type.somfytahoma.current_heating_mode.label = Current Heating Mode
index 448d1b9302465ed53a497926ef8f5519e4673b37..d3dca6bedc5673b1f86eb1bd80ff9ca5852544b4 100644 (file)
                <state readOnly="true"/>
        </channel-type>
 
+       <channel-type id="moving">
+               <item-type>Switch</item-type>
+               <label>Moving</label>
+               <description>Indicates if the device is currently operating a command.</description>
+               <state readOnly="true"/>
+       </channel-type>
+
        <channel-type id="luminance">
                <item-type>Number:Illuminance</item-type>
                <label>Luminance</label>
index 46778dc7aae573b31a26c641280519c28255ee5c..41437867942af0f4cd65968c5344f748c59e3b42 100644 (file)
@@ -11,6 +11,7 @@
                <label>Somfy Roller Shutter</label>
                <channels>
                        <channel id="control" typeId="control"></channel>
+                       <channel id="moving" typeId="moving"></channel>
                </channels>
                <representation-property>url</representation-property>
                <config-description-ref uri="thing-type:somfytahoma:device"/>