[miio] add support for lumi.curtain.hagl05 Xiaomi youpin Curtain Controller (Wi-Fi) (#9017)

* [miio] add support for lumi.curtain.hagl05
* [miio] improve channel description
* [miio] improved mapping for curtain hagl05
* [miio] fix channelTypes

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
Marcel
2020-11-16 02:19:00 +01:00
committed by GitHub
parent 406b7e4392
commit 1e5aaf948c
4 changed files with 295 additions and 0 deletions

View File

@@ -89,6 +89,7 @@ public enum MiIoDevices {
HUMIDIFIER("zhimi.humidifier.v1", "Mi Humdifier", THING_TYPE_BASIC),
LUMI_C11("lumi.ctrl_neutral1.v1", "Light Control (Wall Switch)", THING_TYPE_UNSUPPORTED),
LUMI_C12("lumi.ctrl_neutral2.v1", "Light Control (Wall Switch)", THING_TYPE_UNSUPPORTED),
LUMI_CURTAIN_HAGL05("lumi.curtain.hagl05", "Xiaomi youpin Curtain Controller (Wi-Fi)", THING_TYPE_BASIC),
MRBOND_AIRER_M1PRO("mrbond.airer.m1pro", "Mr Bond M1 Pro Smart Clothes Dryer", THING_TYPE_BASIC),
MRBOND_AIRER_M1S("mrbond.airer.m1s", "Mr Bond M1 Smart Clothes Dryer", THING_TYPE_BASIC),
MRBOND_AIRER_M1SUPER("mrbond.airer.m1super", "Mr Bond M1 Super Smart Clothes Dryer", THING_TYPE_BASIC),

View File

@@ -509,6 +509,66 @@
<item-type>Switch</item-type>
<label>Generic Bool</label>
</channel-type>
<channel-type id="LumiCurtainHagl05_fault">
<item-type>Number</item-type>
<label>Curtain - Device Fault</label>
<state>
<options>
<option value="0">No faults</option>
</options>
</state>
</channel-type>
<channel-type id="LumiCurtainHagl05_status">
<item-type>Number</item-type>
<label>Curtain - Status</label>
<state>
<options>
<option value="0">Stopped</option>
<option value="1">Opening</option>
<option value="2">Closing</option>
</options>
</state>
</channel-type>
<channel-type id="LumiCurtainHagl05_manual-enabled">
<item-type>Number</item-type>
<label>curtain_cfg - manual_enabled</label>
<state>
<options>
<option value="0">Disable</option>
<option value="1">Enable</option>
</options>
</state>
</channel-type>
<channel-type id="LumiCurtainHagl05_polarity">
<item-type>Number</item-type>
<label>curtain_cfg - polarity</label>
<state>
<options>
<option value="0">Positive</option>
<option value="1">Reverse</option>
</options>
</state>
</channel-type>
<channel-type id="LumiCurtainHagl05_pos-limit">
<item-type>Number</item-type>
<label>curtain_cfg - pos_limit</label>
<state>
<options>
<option value="0">Unlimit</option>
<option value="1">Limit</option>
</options>
</state>
</channel-type>
<channel-type id="LumiCurtainHagl05_en-night-tip-light">
<item-type>Switch</item-type>
<label>curtain_cfg - en_night_tip_light</label>
<state>
<options>
<option value="0">Disable</option>
<option value="1">Enable</option>
</options>
</state>
</channel-type>
<channel-type id="vacuumaction">
<item-type>Number</item-type>
<label>Vacuum Action</label>

View File

@@ -0,0 +1,202 @@
{
"deviceMapping": {
"id": [
"lumi.curtain.hagl05"
],
"propertyMethod": "get_properties",
"maxProperties": 1,
"channels": [
{
"property": "fault",
"siid": 2,
"piid": 1,
"friendlyName": "Curtain - Device Fault",
"channel": "fault",
"channelType": "LumiCurtainHagl05_fault",
"type": "Number",
"refresh": true,
"actions": [],
"value-list": [
{
"value": 0,
"description": "No faults"
}
],
"readmeComment": "Value mapping [0\u003d\"No faults\"]"
},
{
"property": "current-position",
"siid": 2,
"piid": 3,
"friendlyName": "Curtain - Current Position",
"channel": "current-position",
"channelType": "miot_uint8",
"type": "Number",
"refresh": true,
"actions": []
},
{
"property": "status",
"siid": 2,
"piid": 6,
"friendlyName": "Curtain - Status",
"channel": "status",
"channelType": "LumiCurtainHagl05_status",
"type": "Number",
"refresh": true,
"actions": [],
"value-list": [
{
"value": 0,
"description": "Stopped"
},
{
"value": 1,
"description": "Opening"
},
{
"value": 2,
"description": "Closing"
}
],
"readmeComment": "Value mapping [0\u003d\"Stopped\",1\u003d\"Opening\",2\u003d\"Closing\"]"
},
{
"property": "target-position",
"siid": 2,
"piid": 7,
"friendlyName": "Curtain - Target Position",
"channel": "target-position",
"channelType": "miot_uint8",
"type": "Number",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
]
},
{
"property": "manual-enabled",
"siid": 4,
"piid": 1,
"friendlyName": "curtain_cfg - Manual Enabled",
"channel": "manual-enabled",
"channelType": "LumiCurtainHagl05_manual-enabled",
"type": "Number",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"value-list": [
{
"value": 0,
"description": "Disable"
},
{
"value": 1,
"description": "Enable"
}
],
"readmeComment": "Value mapping [0\u003d\"Disable\",1\u003d\"Enable\"]"
},
{
"property": "polarity",
"siid": 4,
"piid": 2,
"friendlyName": "curtain_cfg - Polarity",
"channel": "polarity",
"channelType": "LumiCurtainHagl05_polarity",
"type": "Number",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"value-list": [
{
"value": 0,
"description": "Positive"
},
{
"value": 1,
"description": "Reverse"
}
],
"readmeComment": "Value mapping [0\u003d\"Positive\",1\u003d\"Reverse\"]"
},
{
"property": "pos-limit",
"siid": 4,
"piid": 3,
"friendlyName": "curtain_cfg - Position Limit",
"channel": "pos-limit",
"channelType": "LumiCurtainHagl05_pos-limit",
"type": "Number",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"value-list": [
{
"value": 0,
"description": "Unlimit"
},
{
"value": 1,
"description": "Limit"
}
],
"readmeComment": "Value mapping [0\u003d\"Unlimit\",1\u003d\"Limit\"]"
},
{
"property": "en-night-tip-light",
"siid": 4,
"piid": 4,
"friendlyName": "Set Night Tip Light",
"channel": "en-night-tip-light",
"channelType": "LumiCurtainHagl05_en-night-tip-light",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"value-list": [
{
"value": 0,
"description": "Disable"
},
{
"value": 1,
"description": "Enable"
}
],
"readmeComment": "Value mapping [0\u003d\"Disable\",1\u003d\"Enable\"]"
},
{
"property": "run-time",
"siid": 4,
"piid": 5,
"friendlyName": "curtain_cfg - Run-time",
"channel": "run-time",
"channelType": "miot_int32",
"type": "Number",
"refresh": true,
"actions": []
}
],
"experimental": true
}
}