[miio] add support for Smartmi Fresh Air System (zhimi.airfresh.va4&va2) (#11164)

* [miio] add support for Smartmi Fresh Air System (zhimi.airfresh.va4&va2)

Add support for
* Smartmi Fresh Air System (zhimi.airfresh.va4)
* Smartmi Fresh Air System (zhimi.airfresh.va2)

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

* [miio] fix 2 commands and add some formatting

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

* [miio] fix copy paste error

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

* [miio] airfresh channelnames

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

* [miio] merge & count devices

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
Marcel
2021-09-14 16:57:57 +02:00
committed by GitHub
parent db935d3a3b
commit 357d699cdd
3 changed files with 354 additions and 0 deletions

View File

@@ -342,6 +342,8 @@ public enum MiIoDevices {
YUNMI_WATERPURIFIER_V2("yunmi.waterpurifier.v2", "Mi Water Purifier v2", THING_TYPE_BASIC),
YUNMI_WATERPURIFIER_V3("yunmi.waterpurifier.v3", "Mi Water Purifier (Under sink) v3", THING_TYPE_BASIC),
YUNMI_WATERPURIFIER_V4("yunmi.waterpurifier.v4", "Mi Water Purifier v4", THING_TYPE_BASIC),
ZHIMI_AIRFRESH_VA2("zhimi.airfresh.va2", "Smartmi Ventilation System", THING_TYPE_BASIC),
ZHIMI_AIRFRESH_VA4("zhimi.airfresh.va4", "Smartmi Fresh Air System (Heating)", THING_TYPE_BASIC),
ZHIMI_AIRMONITOR_V1("zhimi.airmonitor.v1", "Mi PM2.5 Air Quality Monitor", THING_TYPE_BASIC),
ZHIMI_AIRPURIFIER_M1("zhimi.airpurifier.m1", "Mi Air Purifier 2 (mini)", THING_TYPE_BASIC),
ZHIMI_AIRPURIFIER_M2("zhimi.airpurifier.m2", "Mi Air Purifier 2", THING_TYPE_BASIC),

View File

@@ -0,0 +1,268 @@
{
"deviceMapping": {
"id": [
"zhimi.airfresh.va2",
"zhimi.airfresh.va4"
],
"propertyMethod": "get_prop",
"maxProperties": 2,
"channels": [
{
"property": "power",
"friendlyName": "Power",
"channel": "power",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_power",
"parameterType": "ONOFF"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "ptc_state",
"friendlyName": "Heater",
"channel": "heater",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_ptc_state",
"parameterType": "ONOFF"
}
]
},
{
"property": "mode",
"friendlyName": "Mode",
"channel": "mode",
"type": "String",
"stateDescription": {
"options": [
{
"value": "interval",
"label": "Interval"
},
{
"value": "silent",
"label": "Night"
},
{
"value": "low",
"label": "1"
},
{
"value": "middle",
"label": "2"
},
{
"value": "strong",
"label": "3"
},
{
"value": "auto",
"label": "Auto"
}
]
},
"refresh": true,
"actions": [
{
"command": "set_mode",
"parameterType": "STRING"
}
],
"tags": [
"Control"
],
"readmeComment": "Value mapping `[\"interval\"\u003d\"Interval\",\"silent\"\u003d\"Night\",\"low\"\u003d\"1\",\"middle\"\u003d\"2\",\"strong\"\u003d\"3\",\"auto\"\u003d\"Auto\"]`"
},
{
"property": "humidity",
"friendlyName": "Humidity",
"channel": "humidity",
"type": "Number:Dimensionless",
"unit": "PERCENT",
"refresh": true,
"ChannelGroup": "Status",
"actions": [],
"category": "humidity",
"tags": [
"Measurement",
"Humidity"
]
},
{
"property": "co2",
"friendlyName": "CO2",
"channel": "co2",
"type": "Number:Dimensionless",
"unit": "ppm",
"stateDescription": {
"minimum": 0,
"maximum": 5000,
"step": 1,
"pattern": "%.0f %unit%",
"readOnly": true
},
"refresh": true,
"ChannelGroup": "Status",
"actions": [],
"category": "co2",
"tags": [
"Measurement",
"CO2"
]
},
{
"property": "child_lock",
"friendlyName": "Child Lock",
"channel": "childLock",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_child_lock",
"parameterType": "ONOFFBOOL"
}
]
},
{
"property": "buzzer",
"friendlyName": "Buzzer",
"channel": "buzzer",
"type": "Switch",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_buzzer",
"parameterType": "ONOFF"
}
]
},
{
"property": "aqi",
"friendlyName": "Air Quality Index",
"channel": "aqi",
"type": "Number",
"stateDescription": {
"pattern": "%.0f",
"readOnly": true
},
"refresh": true,
"ChannelGroup": "Status",
"actions": [],
"tags": [
"Measurement"
]
},
{
"property": "average_aqi",
"friendlyName": "Average Air Quality Index",
"channel": "averageaqi",
"type": "Number",
"stateDescription": {
"pattern": "%.0f",
"readOnly": true
},
"refresh": true,
"ChannelGroup": "Status",
"actions": [],
"tags": [
"Measurement"
]
},
{
"property": "f1_hour_used",
"friendlyName": "Filter Hours used",
"channel": "filterhours",
"type": "Number:Time",
"unit": "hours",
"refresh": true,
"ChannelGroup": "Status",
"actions": [],
"category": "time"
},
{
"property": "use_time",
"friendlyName": "Run Time",
"channel": "usedhours",
"type": "Number:Time",
"unit": "hours",
"refresh": true,
"transformation": "SecondsToHours",
"ChannelGroup": "Status",
"actions": [],
"category": "time"
},
{
"property": "motor1_speed",
"friendlyName": "Motor Speed",
"channel": "motorspeed",
"type": "Number",
"stateDescription": {
"pattern": "%.0f rpm",
"readOnly": true
},
"refresh": true,
"ChannelGroup": "Status",
"actions": []
},
{
"property": "led_level",
"friendlyName": "Led - Brightness",
"channel": "led_level",
"type": "Number",
"stateDescription": {
"options": [
{
"value": "0",
"label": "High"
},
{
"value": "1",
"label": "Low"
},
{
"value": "2",
"label": "Idle"
}
]
},
"refresh": true,
"actions": [
{
"command": "set_led_level",
"parameterType": "NUMBER"
}
],
"readmeComment": "Value mapping `[\"0\"\u003d\"High\",\"1\"\u003d\"Low\",\"2\"\u003d\"Idle\"]`"
},
{
"property": "temp_dec",
"friendlyName": "Temperature",
"channel": "temperature",
"type": "Number:Temperature",
"unit": "CELSIUS",
"stateDescription": {
"pattern": "%.1f %unit%",
"readOnly": true
},
"refresh": true,
"ChannelGroup": "Status",
"actions": [],
"category": "temperature",
"tags": [
"Measurement",
"Temperature"
]
}
]
}
}