[miio] add support for Mi Smart Standing Fan 2 (dmaker.fan.p18) (#11106)
closing #11053 Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
@@ -57,6 +57,7 @@ public enum MiIoDevices {
|
||||
DMAKER_FAN_P9("dmaker.fan.p9", "Mi Smart Tower Fan", THING_TYPE_BASIC),
|
||||
DMAKER_FAN_P10("dmaker.fan.p10", "Mi Smart Standing Fan 2", THING_TYPE_BASIC),
|
||||
DMAKER_FAN_P15("dmaker.fan.p15", "Mi Smart Standing Fan Pro", THING_TYPE_BASIC),
|
||||
DMAKER_FAN_P18("dmaker.fan.p18", "Mi Smart Standing Fan 2", THING_TYPE_BASIC),
|
||||
DREAME_VACUUM_MC1808("dreame.vacuum.mc1808", "Mi Robot Vacuum Mop 1C STYTJ01ZHM", THING_TYPE_BASIC),
|
||||
DREAME_VACUUM_P2008("dreame.vacuum.p2008", "Dreame Robot Vacuum-Mop F9", THING_TYPE_BASIC),
|
||||
DREAME_VACUUM_P2009("dreame.vacuum.p2009", "Dreame Robot Vacuum D9 ", THING_TYPE_BASIC),
|
||||
|
||||
@@ -0,0 +1,317 @@
|
||||
{
|
||||
"deviceMapping": {
|
||||
"id": [
|
||||
"dmaker.fan.p18"
|
||||
],
|
||||
"propertyMethod": "get_properties",
|
||||
"maxProperties": 1,
|
||||
"channels": [
|
||||
{
|
||||
"property": "",
|
||||
"friendlyName": "Actions",
|
||||
"channel": "actions",
|
||||
"type": "String",
|
||||
"stateDescription": {
|
||||
"options": [
|
||||
{
|
||||
"value": "fan-toggle",
|
||||
"label": "Fan Toggle"
|
||||
}
|
||||
]
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"command": "action",
|
||||
"parameterType": "EMPTY",
|
||||
"siid": 2,
|
||||
"aiid": 1,
|
||||
"condition": {
|
||||
"name": "matchValue",
|
||||
"parameters": [
|
||||
{
|
||||
"matchValue": "fan-toggle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "on",
|
||||
"siid": 2,
|
||||
"piid": 1,
|
||||
"friendlyName": "Fan - Switch Status",
|
||||
"channel": "on",
|
||||
"type": "Switch",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "ONOFFBOOL"
|
||||
}
|
||||
],
|
||||
"category": "switch",
|
||||
"tags": [
|
||||
"Switch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "fan-level",
|
||||
"siid": 2,
|
||||
"piid": 2,
|
||||
"friendlyName": "Fan - Fan Level",
|
||||
"channel": "fan_level",
|
||||
"type": "Number",
|
||||
"stateDescription": {
|
||||
"options": [
|
||||
{
|
||||
"value": "1",
|
||||
"label": "Level1"
|
||||
},
|
||||
{
|
||||
"value": "2",
|
||||
"label": "Level2"
|
||||
},
|
||||
{
|
||||
"value": "3",
|
||||
"label": "Level3"
|
||||
},
|
||||
{
|
||||
"value": "4",
|
||||
"label": "Level4"
|
||||
}
|
||||
]
|
||||
},
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "NUMBER"
|
||||
}
|
||||
],
|
||||
"category": "fan",
|
||||
"tags": [
|
||||
"SetPoint"
|
||||
],
|
||||
"readmeComment": "Value mapping `[\"1\"\u003d\"Level1\",\"2\"\u003d\"Level2\",\"3\"\u003d\"Level3\",\"4\"\u003d\"Level4\"]`"
|
||||
},
|
||||
{
|
||||
"property": "mode",
|
||||
"siid": 2,
|
||||
"piid": 3,
|
||||
"friendlyName": "Fan - Mode",
|
||||
"channel": "mode",
|
||||
"type": "Number",
|
||||
"stateDescription": {
|
||||
"options": [
|
||||
{
|
||||
"value": "0",
|
||||
"label": "Straight Wind"
|
||||
},
|
||||
{
|
||||
"value": "1",
|
||||
"label": "Natural Wind"
|
||||
}
|
||||
]
|
||||
},
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "NUMBER"
|
||||
}
|
||||
],
|
||||
"category": "flow",
|
||||
"tags": [
|
||||
"Control"
|
||||
],
|
||||
"readmeComment": "Value mapping `[\"0\"\u003d\"Straight Wind\",\"1\"\u003d\"Natural Wind\"]`"
|
||||
},
|
||||
{
|
||||
"property": "horizontal-swing",
|
||||
"siid": 2,
|
||||
"piid": 4,
|
||||
"friendlyName": "Fan - Horizontal Swing",
|
||||
"channel": "horizontal_swing",
|
||||
"type": "Switch",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "ONOFFBOOL"
|
||||
}
|
||||
],
|
||||
"category": "switch",
|
||||
"tags": [
|
||||
"Switch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "horizontal-angle",
|
||||
"siid": 2,
|
||||
"piid": 5,
|
||||
"friendlyName": "Fan - Horizontal Angle",
|
||||
"channel": "horizontal_angle",
|
||||
"type": "Number",
|
||||
"stateDescription": {
|
||||
"options": [
|
||||
{
|
||||
"value": "30",
|
||||
"label": "30"
|
||||
},
|
||||
{
|
||||
"value": "60",
|
||||
"label": "60"
|
||||
},
|
||||
{
|
||||
"value": "90",
|
||||
"label": "90"
|
||||
},
|
||||
{
|
||||
"value": "120",
|
||||
"label": "120"
|
||||
},
|
||||
{
|
||||
"value": "140",
|
||||
"label": "140"
|
||||
}
|
||||
]
|
||||
},
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "STRING"
|
||||
}
|
||||
],
|
||||
"category": "incline",
|
||||
"tags": [
|
||||
"Setpoint"
|
||||
],
|
||||
"readmeComment": "Value mapping `[\"30\"\u003d\"30\",\"60\"\u003d\"60\",\"90\"\u003d\"90\",\"120\"\u003d\"120\",\"140\"\u003d\"140\"]`"
|
||||
},
|
||||
{
|
||||
"property": "off-delay-time",
|
||||
"siid": 2,
|
||||
"piid": 6,
|
||||
"friendlyName": "Fan - Power Off Delay Time",
|
||||
"channel": "off_delay_time",
|
||||
"type": "Number:Time",
|
||||
"unit": "minutes",
|
||||
"stateDescription": {
|
||||
"minimum": 0,
|
||||
"maximum": 480,
|
||||
"step": 1,
|
||||
"pattern": "%.0f %unit%"
|
||||
},
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "STRING"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "brightness",
|
||||
"siid": 2,
|
||||
"piid": 7,
|
||||
"friendlyName": "Fan - Brightness",
|
||||
"channel": "brightness",
|
||||
"type": "Switch",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "ONOFFBOOL"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "alarm",
|
||||
"siid": 2,
|
||||
"piid": 8,
|
||||
"friendlyName": "Fan - Alarm",
|
||||
"channel": "alarm",
|
||||
"type": "Switch",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "ONOFFBOOL"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "motor-control",
|
||||
"siid": 2,
|
||||
"piid": 9,
|
||||
"friendlyName": "Fan - Motor Control",
|
||||
"channel": "motor_control",
|
||||
"type": "Number",
|
||||
"stateDescription": {
|
||||
"options": [
|
||||
{
|
||||
"value": "0",
|
||||
"label": "NO"
|
||||
},
|
||||
{
|
||||
"value": "1",
|
||||
"label": "LEFT"
|
||||
},
|
||||
{
|
||||
"value": "2",
|
||||
"label": "RIGHT"
|
||||
}
|
||||
]
|
||||
},
|
||||
"refresh": false,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "NUMBER"
|
||||
}
|
||||
],
|
||||
"readmeComment": "Value mapping [\"0\"\u003d\"NO\",\"1\"\u003d\"LEFT\",\"2\"\u003d\"RIGHT\"]"
|
||||
},
|
||||
{
|
||||
"property": "speed-level",
|
||||
"siid": 2,
|
||||
"piid": 10,
|
||||
"friendlyName": "Fan - Speed Level",
|
||||
"channel": "speed_level",
|
||||
"type": "Number",
|
||||
"stateDescription": {
|
||||
"minimum": 1,
|
||||
"maximum": 100,
|
||||
"step": 1,
|
||||
"pattern": "%.0f"
|
||||
},
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "NUMBER"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "physical-controls-locked",
|
||||
"siid": 3,
|
||||
"piid": 1,
|
||||
"friendlyName": "Physical Control Locked - Physical Control Locked",
|
||||
"channel": "physical_controls_locked",
|
||||
"type": "Switch",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "ONOFFBOOL"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"readmeComment": "Identified manual actions for execution\u003cbr /\u003e`action{\"did\":\"fan-toggle\",\"siid\":2,\"aiid\":1,\"in\":[]}`\u003cbr /\u003ePlease test and feedback if they are working to they can be linked to a channel.",
|
||||
"experimental": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user