[chamberlainmyq] Added new Close Error and Open Error Switch Items fo… (#11115)

Signed-off-by: Ofir Strull <ofir@veev.com>
This commit is contained in:
ofirster 2021-09-19 23:06:35 +03:00 committed by GitHub
parent e1e9f90da1
commit 66956d736f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 1 deletions

View 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"}
}

View 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);
}
}

View 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"/>
@ -60,6 +62,16 @@
<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>