Skip to content

Commit

Permalink
Merge branch 'release/0.6.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi committed Apr 10, 2021
2 parents 6cd2235 + 7618f67 commit c7a6aae
Show file tree
Hide file tree
Showing 4 changed files with 485 additions and 179 deletions.
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ This custom component is more or less the beta version of the [official componen
| Smartmi Fresh Air System XFXT01ZM | zhimi.airfresh.va2 | XFXT01ZM | |
| Smartmi Fresh Air System XFXTDFR02ZM | zhimi.airfresh.va4 | XFXTDFR02ZM | PTC/Heater support |
| Mi Fresh Air Ventilator | [dmaker.airfresh.t2017](docs/dmaker-airfresh-t2017.md) | MJXFJ-300-G1**?** | 300m3/h (Air volume), 35W, 36db(A), 16kg |
| Mi Fresh Air Ventilator | dmaker.airfresh.a1 | MJXFJ-150-A1 | 150m<sup>3</sup>/h (Air volume), 20W, 36db(A), 8kg |
| Pedestal Fan Fan V2 | zhimi.fan.v2 | | |
| Pedestal Fan Fan V3 | zhimi.fan.v3 | | |
| Pedestal Fan Fan SA1 | zhimi.fan.sa1 | | |
Expand All @@ -52,6 +53,7 @@ This custom component is more or less the beta version of the [official componen
| Pedestal Fan Fan P9 | dmaker.fan.p9 | | |
| Pedestal Fan Fan P10 | dmaker.fan.p10 | | |
| Mijia Pedestal Fan | dmaker.fan.p11 | BPLDS03DM | 2800mAh, 24W, <=58dB |
| Rosou SS4 Ventilator | leshow.fan.ss4 | | |

Support unknown / Testing required:
- Mijia Humidifier 4L (MJJSQ04DY), 300ml/h, 25W, <=38dB: Please create an issue if you own this device.
Expand Down Expand Up @@ -342,6 +344,7 @@ This model uses newer MiOT communication protocol.
- LED brightness (off, dim, bright)
- Target humidity (30 - 80)
- Dry mode (on, off)
- Clean mode (on, off)
- Motor speed rpm (200 - 2000)
- Attributes
- `model`
Expand All @@ -361,6 +364,7 @@ This model uses newer MiOT communication protocol.
- `power_time`
- `water_level`
- `use_time`
- `clean_mode`

### Air Humidifier CB (zhimi.humidifier.cb1)

Expand Down Expand Up @@ -435,7 +439,7 @@ This model uses newer MiOT communication protocol.
- `extra_features`
- `ptc` (zhimi.airfresh.va4 only)

### Mi Fresh Air Ventilator (dmaker.airfresh.t2017)
### Mi Fresh Air Ventilator (dmaker.airfresh.t2017, dmaker.airfresh.a1)

This paragraph was moved to [docs/dmaker-airfresh-t2017.md](docs/dmaker-airfresh-t2017.md).

Expand Down Expand Up @@ -517,6 +521,24 @@ This paragraph was moved to [docs/dmaker-airfresh-t2017.md](docs/dmaker-airfresh
- `led` (zhimi.fan.v2 only)
- `battery_state` (zhimi.fan.v2 only)

### Rosou SS4 Ventilator (leshow.fan.ss4)

* Power (on, off)
* Operation modes (manual, sleep, strong, natural)
* Speed levels (Level 1, Level 2, Level 3, Level 4 / 0...100%)
* Oscillate (on, off)
* Buzzer (on, off)
* Delayed turn off (minutes)

* Attributes
- `model`
- `mode`
- `speed`
- `buzzer`
- `oscillate`
- `delay_off_countdown`
- `error_detected`


## Install

Expand Down Expand Up @@ -1006,6 +1028,22 @@ Set motor speed RPM.
| `entity_id` | no | Only act on a specific Xiaomi miIO fan entity. |
| `motor_speed` | no | Motor speed RPM. Allowed values are between 200 and 2000 |
### Service `xiaomi_miio_airpurifier.fan_set_clean_mode_on` (Air Humidifier CA4)
Turn the clean mode on.
| Service data attribute | Optional | Description |
|---------------------------|----------|----------------------------------------------------------------------|
| `entity_id` | no | Only act on a specific Xiaomi miIO fan entity. |
### Service `xiaomi_miio_airpurifier.fan_set_clean_mode_off` (Air Humidifier CA4)
Turn the clean mode off.
| Service data attribute | Optional | Description |
|---------------------------|----------|----------------------------------------------------------------------|
| `entity_id` | no | Only act on a specific Xiaomi miIO fan entity. |
#### Service `xiaomi_miio_airpurifier.fan_set_fan_level` (Air Purifier 3H only)
Set the level when on fan mode.
Expand Down
22 changes: 22 additions & 0 deletions custom_components/xiaomi_miio_airpurifier/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,28 @@ async def async_set_buzzer_off(self):
False,
)

async def async_set_led_on(self):
"""Turn the led on."""
if self._device_features & FEATURE_SET_LED == 0:
return

await self._try_command(
"Turning the led of the miio device on failed.",
self._device.set_led,
True,
)

async def async_set_led_off(self):
"""Turn the led off."""
if self._device_features & FEATURE_SET_LED == 0:
return

await self._try_command(
"Turning the led of the miio device off failed.",
self._device.set_led,
False,
)

async def async_set_child_lock_on(self):
"""Turn the child lock on."""
if self._device_features & FEATURE_SET_CHILD_LOCK == 0:
Expand Down
Loading

0 comments on commit c7a6aae

Please sign in to comment.