[miio] Add support zhimi.heater.zb1 & zhimi.heater.za2 (#9055)
* [miio] Add support zhimi.heater.zb1 & zhimi.heater.za2 * [miio] capitalize channel labels Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
@@ -262,6 +262,8 @@ public enum MiIoDevices {
|
||||
YL_CEILING2("yilai.light.ceiling2", "Yeelight yilai ceiling", THING_TYPE_BASIC),
|
||||
YL_CEILING3("yilai.light.ceiling3", "Yeelight yilai ceiling", THING_TYPE_BASIC),
|
||||
ZHIMI_HEATER_ZA1("zhimi.heater.za1", "Zhimi Heater", THING_TYPE_BASIC),
|
||||
ZHIMI_HEATER_ZA2("zhimi.heater.za2", "Zhimi Heater", THING_TYPE_BASIC),
|
||||
ZHIMI_HEATER_ZB1("zhimi.heater.zb1", "Zhimi Heater", THING_TYPE_BASIC),
|
||||
UNKNOWN("unknown", "Unknown Mi IO Device", THING_TYPE_UNSUPPORTED);
|
||||
|
||||
public static MiIoDevices getType(String modelString) {
|
||||
|
||||
@@ -38,6 +38,9 @@ public enum MiIoQuantiyTypes {
|
||||
SECOND(SmartHomeUnits.SECOND),
|
||||
MINUTE(SmartHomeUnits.MINUTE),
|
||||
HOUR(SmartHomeUnits.HOUR),
|
||||
SECONDS(SmartHomeUnits.SECOND),
|
||||
MINUTES(SmartHomeUnits.MINUTE),
|
||||
HOURS(SmartHomeUnits.HOUR),
|
||||
AMPERE(SmartHomeUnits.AMPERE),
|
||||
WATT(SmartHomeUnits.WATT);
|
||||
|
||||
|
||||
@@ -82,6 +82,18 @@
|
||||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<!-- Generic Numeric QtyType channels -->
|
||||
<channel-type id="temperatureRW">
|
||||
<item-type>Number:Temperature</item-type>
|
||||
<label>Temperature</label>
|
||||
<state pattern="%.1f %unit%"/>
|
||||
</channel-type>
|
||||
<channel-type id="time">
|
||||
<item-type>Number:Time</item-type>
|
||||
<label>Hours</label>
|
||||
<state readOnly="true" pattern="%.0f %unit%"/>
|
||||
</channel-type>
|
||||
|
||||
<!-- Common Actions channels -->
|
||||
<channel-type id="commands" advanced="true">
|
||||
<item-type>String</item-type>
|
||||
@@ -712,4 +724,28 @@
|
||||
</options>
|
||||
</state>
|
||||
</channel-type>
|
||||
<channel-type id="ZhimiHeaterZa2_target-temperature">
|
||||
<item-type>Number:Temperature</item-type>
|
||||
<label>Heater - Target Temperature</label>
|
||||
<state min="16" max="28" step="1" pattern="%.1f %unit%">
|
||||
</state>
|
||||
</channel-type>
|
||||
<channel-type id="ZhimiHeaterZb1_country-code">
|
||||
<item-type>Number</item-type>
|
||||
<label>Private-Service - Country-Code</label>
|
||||
<state>
|
||||
<options>
|
||||
<option value="0">Unknown</option>
|
||||
<option value="1">US</option>
|
||||
<option value="7">RU</option>
|
||||
<option value="33">FR</option>
|
||||
<option value="44">EU</option>
|
||||
<option value="81">JP</option>
|
||||
<option value="82">KR</option>
|
||||
<option value="86">CN</option>
|
||||
<option value="852">HK</option>
|
||||
<option value="886">TW</option>
|
||||
</options>
|
||||
</state>
|
||||
</channel-type>
|
||||
</thing:thing-descriptions>
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
{
|
||||
"deviceMapping": {
|
||||
"id": [
|
||||
"zhimi.heater.za2"
|
||||
],
|
||||
"propertyMethod": "get_properties",
|
||||
"maxProperties": 1,
|
||||
"channels": [
|
||||
{
|
||||
"property": "fault",
|
||||
"siid": 2,
|
||||
"piid": 1,
|
||||
"friendlyName": "Heater - Device Fault",
|
||||
"channel": "fault",
|
||||
"channelType": "miot_uint32",
|
||||
"type": "Number",
|
||||
"refresh": true,
|
||||
"actions": []
|
||||
},
|
||||
{
|
||||
"property": "on",
|
||||
"siid": 2,
|
||||
"piid": 2,
|
||||
"friendlyName": "Heater - Power",
|
||||
"channel": "on",
|
||||
"channelType": "miot_bool",
|
||||
"type": "Switch",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "ONOFFBOOL"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "target-temperature",
|
||||
"siid": 2,
|
||||
"piid": 6,
|
||||
"friendlyName": "Heater - Target Temperature",
|
||||
"channel": "target-temperature",
|
||||
"channelType": "ZhimiHeaterZa2_target-temperature",
|
||||
"type": "Number:Temperature",
|
||||
"unit": "CELCIUS",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "NUMBER"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "alarm",
|
||||
"siid": 3,
|
||||
"piid": 1,
|
||||
"friendlyName": "Alarm - Alarm",
|
||||
"channel": "alarm",
|
||||
"channelType": "miot_bool",
|
||||
"type": "Switch",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "ONOFFBOOL"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "countdown-time",
|
||||
"siid": 4,
|
||||
"piid": 1,
|
||||
"friendlyName": "Countdown - Countdown Time",
|
||||
"channel": "countdown-time",
|
||||
"channelType": "time",
|
||||
"type": "Number:Time",
|
||||
"unit": "hours",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "STRING"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "relative-humidity",
|
||||
"siid": 5,
|
||||
"piid": 7,
|
||||
"friendlyName": "Environment - Relative Humidity",
|
||||
"channel": "relative-humidity",
|
||||
"channelType": "humidity",
|
||||
"type": "Number",
|
||||
"refresh": true,
|
||||
"actions": []
|
||||
},
|
||||
{
|
||||
"property": "temperature",
|
||||
"siid": 5,
|
||||
"piid": 8,
|
||||
"friendlyName": "Environment - Temperature",
|
||||
"channel": "temperature",
|
||||
"channelType": "temperatureC",
|
||||
"type": "Number:Temperature",
|
||||
"unit": "CELCIUS",
|
||||
"refresh": true,
|
||||
"actions": []
|
||||
},
|
||||
{
|
||||
"property": "brightness",
|
||||
"siid": 6,
|
||||
"piid": 1,
|
||||
"friendlyName": "Indicator Light - Brightness",
|
||||
"channel": "brightness",
|
||||
"channelType": "brightness",
|
||||
"type": "Dimmer",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "NUMBER"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "physical-controls-locked",
|
||||
"siid": 7,
|
||||
"piid": 1,
|
||||
"friendlyName": "Physical Control Locked - Physical Controls Locked",
|
||||
"channel": "physical-controls-locked",
|
||||
"channelType": "miot_bool",
|
||||
"type": "Switch",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "ONOFFBOOL"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "use-time",
|
||||
"siid": 8,
|
||||
"piid": 7,
|
||||
"friendlyName": "Private-Service - Use Time",
|
||||
"channel": "use-time",
|
||||
"channelType": "time",
|
||||
"type": "Number:Time",
|
||||
"unit": "seconds",
|
||||
"refresh": true,
|
||||
"actions": []
|
||||
}
|
||||
],
|
||||
"experimental": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
{
|
||||
"deviceMapping": {
|
||||
"id": [
|
||||
"zhimi.heater.zb1"
|
||||
],
|
||||
"propertyMethod": "get_properties",
|
||||
"maxProperties": 1,
|
||||
"channels": [
|
||||
{
|
||||
"property": "fault",
|
||||
"siid": 2,
|
||||
"piid": 1,
|
||||
"friendlyName": "Heater - Device Fault",
|
||||
"channel": "fault",
|
||||
"channelType": "miot_uint32",
|
||||
"type": "Number",
|
||||
"refresh": true,
|
||||
"actions": []
|
||||
},
|
||||
{
|
||||
"property": "on",
|
||||
"siid": 2,
|
||||
"piid": 2,
|
||||
"friendlyName": "Heater - Power",
|
||||
"channel": "on",
|
||||
"channelType": "miot_bool",
|
||||
"type": "Switch",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "ONOFFBOOL"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "target-temperature",
|
||||
"siid": 2,
|
||||
"piid": 6,
|
||||
"friendlyName": "Heater - Target Temperature",
|
||||
"channel": "target-temperature",
|
||||
"channelType": "ZhimiHeaterZa2_target-temperature",
|
||||
"type": "Number:Temperature",
|
||||
"unit": "CELCIUS",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "NUMBER"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "alarm",
|
||||
"siid": 3,
|
||||
"piid": 1,
|
||||
"friendlyName": "Alarm - Alarm",
|
||||
"channel": "alarm",
|
||||
"channelType": "miot_bool",
|
||||
"type": "Switch",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "ONOFFBOOL"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "countdown-time",
|
||||
"siid": 4,
|
||||
"piid": 1,
|
||||
"friendlyName": "Countdown - Countdown Time",
|
||||
"channel": "countdown-time",
|
||||
"channelType": "time",
|
||||
"type": "Number:Time",
|
||||
"unit": "hours",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "STRING"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "relative-humidity",
|
||||
"siid": 5,
|
||||
"piid": 7,
|
||||
"friendlyName": "Environment - Relative Humidity",
|
||||
"channel": "relative-humidity",
|
||||
"channelType": "humidity",
|
||||
"type": "Number",
|
||||
"refresh": true,
|
||||
"actions": []
|
||||
},
|
||||
{
|
||||
"property": "temperature",
|
||||
"siid": 5,
|
||||
"piid": 8,
|
||||
"friendlyName": "Environment - Temperature",
|
||||
"channel": "temperature",
|
||||
"channelType": "temperatureC",
|
||||
"type": "Number:Temperature",
|
||||
"unit": "CELCIUS",
|
||||
"refresh": true,
|
||||
"actions": []
|
||||
},
|
||||
{
|
||||
"property": "brightness",
|
||||
"siid": 6,
|
||||
"piid": 1,
|
||||
"friendlyName": "Indicator Light - Brightness",
|
||||
"channel": "brightness",
|
||||
"channelType": "brightness",
|
||||
"type": "Dimmer",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "NUMBER"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "physical-controls-locked",
|
||||
"siid": 7,
|
||||
"piid": 1,
|
||||
"friendlyName": "Physical Control Locked - Physical Controls Locked",
|
||||
"channel": "physical-controls-locked",
|
||||
"channelType": "miot_bool",
|
||||
"type": "Switch",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "ONOFFBOOL"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "use-time",
|
||||
"siid": 8,
|
||||
"piid": 7,
|
||||
"friendlyName": "Private-Service - Use Time",
|
||||
"channel": "use-time",
|
||||
"channelType": "time",
|
||||
"type": "Number:Time",
|
||||
"unit": "seconds",
|
||||
"refresh": true,
|
||||
"actions": []
|
||||
},
|
||||
{
|
||||
"property": "country-code",
|
||||
"siid": 8,
|
||||
"piid": 8,
|
||||
"friendlyName": "Private-Service - Country-Code",
|
||||
"channel": "country-code",
|
||||
"channelType": "ZhimiHeaterZb1_country-code",
|
||||
"type": "Number",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_properties",
|
||||
"parameterType": "NUMBER"
|
||||
}
|
||||
],
|
||||
"value-list": [
|
||||
{
|
||||
"value": 0,
|
||||
"description": "Unknown"
|
||||
},
|
||||
{
|
||||
"value": 1,
|
||||
"description": "US"
|
||||
},
|
||||
{
|
||||
"value": 82,
|
||||
"description": "KR"
|
||||
},
|
||||
{
|
||||
"value": 44,
|
||||
"description": "EU"
|
||||
},
|
||||
{
|
||||
"value": 81,
|
||||
"description": "JP"
|
||||
},
|
||||
{
|
||||
"value": 7,
|
||||
"description": "RU"
|
||||
},
|
||||
{
|
||||
"value": 86,
|
||||
"description": "CN"
|
||||
},
|
||||
{
|
||||
"value": 852,
|
||||
"description": "HK"
|
||||
},
|
||||
{
|
||||
"value": 886,
|
||||
"description": "TW"
|
||||
},
|
||||
{
|
||||
"value": 33,
|
||||
"description": "FR"
|
||||
}
|
||||
],
|
||||
"readmeComment": "Value mapping [0\u003d\"Unknown\",1\u003d\"US\",82\u003d\"KR\",44\u003d\"EU\",81\u003d\"JP\",7\u003d\"RU\",86\u003d\"CN\",852\u003d\"HK\",886\u003d\"TW\",33\u003d\"FR\"]"
|
||||
}
|
||||
],
|
||||
"experimental": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user