]> git.basschouten.com Git - openhab-addons.git/commitdiff
[chamberlainmyq] Added new Close Error and Open Error Switch Items fo… (#11115)
authorofirster <34866462+ofirster@users.noreply.github.com>
Sun, 19 Sep 2021 20:06:35 +0000 (23:06 +0300)
committerGitHub <noreply@github.com>
Sun, 19 Sep 2021 20:06:35 +0000 (22:06 +0200)
Signed-off-by: Ofir Strull <ofir@veev.com>
bundles/org.openhab.binding.myq/README.md
bundles/org.openhab.binding.myq/src/main/java/org/openhab/binding/myq/internal/handler/MyQGarageDoorHandler.java
bundles/org.openhab.binding.myq/src/main/resources/OH-INF/thing/thing-types.xml

index a8094c3546967418b9a2452097571282db20b22d..88407bde2d3f4f263becc5f96294ece2fd768eac 100644 (file)
@@ -32,7 +32,9 @@ Once an account has been added, garage doors and lamps will automatically be dis
 |---------------|---------------|------------------|--------------------------------------------------------|
 | status        | String        | garagedoor       | opening, closed, closing, stopped, transition, unknown |
 | rollershutter | Rollershutter | garagedoor       | UP, DOWN, 0%, 100%                                     |
-| switch        | Switch        | garagedoor, lamp | ON (open), OFF (closed)
+| closeError    | Switch        | garagedoor       | ON (has error), OFF (doesn't have error)               |
+| openError     | Switch        | garagedoor       | ON (has error), OFF (doesn't have error)               |
+| switch        | Switch        | garagedoor, lamp | ON (open), OFF (closed)                                |
 
 ## Full Example
 
@@ -50,6 +52,8 @@ Bridge myq:account:home "MyQ Account" [ username="foo@bar.com", password="secret
 ```xtend
 String MyQGarageDoor1Status "Door Status [%s]" {channel = "myq:garagedoor:home:abcd12345:status"}
 Switch MyQGarageDoor1Switch "Door Switch [%s]" {channel = "myq:garagedoor:home:abcd12345:switch"}
+Switch MyQGarageDoor1CloseError "Door Close Error [%s]" {channel = "myq:garagedoor:home:abcd12345:closeError"}
+Switch MyQGarageDoor1OpenError "Door OpenError [%s]" {channel = "myq:garagedoor:home:abcd12345:openError"}
 Rollershutter MyQGarageDoor1Rollershutter "Door Rollershutter [%s]" {channel = "myq:garagedoor:home:abcd12345:rollershutter"}
 Switch MyQGarageDoorLamp "Lamp [%s]" {channel = "myq:lamp:home:efgh6789:switch"}
 }
index c83c4acdabdad1a4129b9e73b498c214a45bca1d..a2422f3d0feebc2ea0bb2dfd186570f3f42b8dad 100644 (file)
@@ -112,6 +112,8 @@ public class MyQGarageDoorHandler extends BaseThingHandler implements MyQDeviceH
                     updateState("rollershutter", UnDefType.UNDEF);
                     break;
             }
+            updateState("closeerror", localState.state.isUnattendedCloseAllowed ? OnOffType.OFF : OnOffType.ON);
+            updateState("openerror", localState.state.isUnattendedOpenAllowed ? OnOffType.OFF : OnOffType.ON);
         }
     }
 
index dbe68946840e59d17f166217a7eba6529c38e4ab..56fb3cb420e94ab6f7afb753bef60204ea1b0778 100644 (file)
@@ -19,6 +19,8 @@
                        <channel id="status" typeId="doorstatus"/>
                        <channel id="switch" typeId="doorswitch"/>
                        <channel id="rollershutter" typeId="doorrollershutter"/>
+                       <channel id="closeerror" typeId="doorcloseerror"/>
+                       <channel id="openerror" typeId="dooropenerror"/>
                </channels>
                <representation-property>serialNumber</representation-property>
                <config-description-ref uri="thing-type:myq:garagedoor"/>
                <item-type>Rollershutter</item-type>
                <label>Garage Door Rollershutter</label>
        </channel-type>
+       <channel-type id="doorcloseerror">
+               <item-type>Switch</item-type>
+               <label>Garage Door Close Error</label>
+               <state readOnly="true"/>
+       </channel-type>
+       <channel-type id="dooropenerror">
+               <item-type>Switch</item-type>
+               <label>Garage Door Open Error</label>
+               <state readOnly="true"/>
+       </channel-type>
        <channel-type id="lampswitch">
                <item-type>Switch</item-type>
                <label>Lamp Switch</label>