[miio] Add Zhimi Heater za1 (#8743)

add model zhimi.heater.za1

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
Marcel 2020-10-14 22:59:38 +02:00 committed by GitHub
parent 5e2c5345eb
commit aef1d10f40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 148 additions and 0 deletions

View File

@ -311,6 +311,7 @@ or in case of unknown models include the model information e.g.:
| Yeelight yilai ceiling | miio:basic | [yilai.light.ceiling1](#yilai-light-ceiling1) | Yes | |
| Yeelight yilai ceiling | miio:basic | [yilai.light.ceiling2](#yilai-light-ceiling2) | Yes | |
| Yeelight yilai ceiling | miio:basic | [yilai.light.ceiling3](#yilai-light-ceiling3) | Yes | |
| Zhimi Heater | miio:basic | [zhimi.heater.za1](#zhimi-heater-za1) | Yes | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
# Advanced: Unsupported devices
@ -3021,6 +3022,20 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena
| customScene | String | Set Scene | |
| nightlightBrightness | Number | Nightlight Brightness | |
### Zhimi Heater (<a name="zhimi-heater-za1">zhimi.heater.za1</a>) Channels
| Channel | Type | Description | Comment |
|------------------|---------|-------------------------------------|------------|
| power | Switch | Power | |
| target_temperature | Number | Target Temperature | |
| brightness | Number | Brightness | |
| buzzer | Switch | Buzzer Status | |
| relative_humidity | Number | Relative Humidity | |
| childlock | Switch | Child Lock | |
| HWSwitch | Switch | HW Switch | |
| temperature | Number | Temperature | |
| usedhours | Number | Run Time | |
@ -6260,4 +6275,21 @@ String customScene "Set Scene" (G_light) {channel="miio:basic:light:customScene"
Number nightlightBrightness "Nightlight Brightness" (G_light) {channel="miio:basic:light:nightlightBrightness"}
```
### Zhimi Heater (zhimi.heater.za1) item file lines
note: Autogenerated example. Replace the id (heater) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered.
```java
Group G_heater "Zhimi Heater" <status>
Switch power "Power" (G_heater) {channel="miio:basic:heater:power"}
Number target_temperature "Target Temperature" (G_heater) {channel="miio:basic:heater:target_temperature"}
Number brightness "Brightness" (G_heater) {channel="miio:basic:heater:brightness"}
Switch buzzer "Buzzer Status" (G_heater) {channel="miio:basic:heater:buzzer"}
Number relative_humidity "Relative Humidity" (G_heater) {channel="miio:basic:heater:relative_humidity"}
Switch childlock "Child Lock" (G_heater) {channel="miio:basic:heater:childlock"}
Switch HWSwitch "HW Switch" (G_heater) {channel="miio:basic:heater:HWSwitch"}
Number temperature "Temperature" (G_heater) {channel="miio:basic:heater:temperature"}
Number usedhours "Run Time" (G_heater) {channel="miio:basic:heater:usedhours"}
```

View File

@ -253,6 +253,7 @@ public enum MiIoDevices {
YL_CEILING1("yilai.light.ceiling1", "Yeelight yilai ceiling", THING_TYPE_BASIC),
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),
UNKNOWN("unknown", "Unknown Mi IO Device", THING_TYPE_UNSUPPORTED);
public static MiIoDevices getType(String modelString) {

View File

@ -0,0 +1,115 @@
{
"deviceMapping": {
"id": [
"zhimi.heater.za1"
],
"propertyMethod": "get_prop",
"maxProperties": 2,
"channels": [
{
"property": "power",
"friendlyName": "Power",
"channel": "power",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_power",
"parameterType": "ONOFF"
}
]
},
{
"property": "target_temperature",
"friendlyName": "Target Temperature",
"channel": "target_temperature",
"type": "Number",
"refresh": true,
"actions": [
{
"command": "set_target_temperature",
"parameterType": "NUMBER"
}
]
},
{
"property": "brightness",
"friendlyName": "Brightness",
"channel": "brightness",
"type": "Number",
"refresh": true,
"actions": [
{
"command": "set_brightness",
"parameterType": "NUMBER"
}
]
},
{
"property": "buzzer",
"friendlyName": "Buzzer Status",
"channel": "buzzer",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_buzzer",
"parameterType": "ONOFF"
}
]
},
{
"property": "relative_humidity",
"friendlyName": "Relative Humidity",
"channel": "relative_humidity",
"type": "Number",
"refresh": true,
"actions": []
},
{
"property": "child_lock",
"friendlyName": "Child Lock",
"channel": "childlock",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_child_lock",
"parameterType": "ONOFF"
}
]
},
{
"property": "theqmostat",
"friendlyName": "HW Switch",
"channel": "HWSwitch",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_theqmostat",
"parameterType": "ONOFF"
}
]
},
{
"property": "temperature",
"friendlyName": "Temperature",
"channel": "temperature",
"type": "Number",
"refresh": true,
"actions": []
},
{
"property": "use_time",
"friendlyName": "Run Time",
"channel": "usedhours",
"type": "Number",
"refresh": true,
"transformation": "SecondsToHours",
"actions": []
}
],
"experimental": true
}
}