Skip to content

Commit b66c857

Browse files
committed
Merge branch 'release/2022.3.3.1'
2 parents fe47feb + c7bee66 commit b66c857

File tree

3 files changed

+13
-24
lines changed

3 files changed

+13
-24
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ This custom component is more or less the beta version of the [official componen
4848
| Mijia Smart Sterilization Humidifier S | deerma.humidifier.mjjsq | MJJSQ03DY | 4.5L, <=39dB, 450mL/h, 40W |
4949
| Mijia Intelligent Sterilization Humidifier (EU version?) | deerma.humidifier.jsq | ZNJSQ01DEM | 4.5L, <=38dB, 300mL/h, 24W |
5050
| Mijia Intelligent Sterilization Humidifier (EU version?) | deerma.humidifier.jsq5 | ZNJSQ01DEM | 4.5L, <=38dB, 300mL/h, 24W |
51+
| Mijia Smart Sterilization Humidifier S (EU version?) | deerma.humidifier.jsqs | MJJSQ03DY | 4.5L, <=39dB, 450mL/h, 40W |
5152
| Mijia Intelligent Sterilization Humidifier SCK0A45 | deerma.humidifier.jsq1 | SCKOA45, SCK0A45 | 4.5L, <=38dB, 300mL/h, 25W |
5253
| Zero Fog Humidifier | shuii.humidifier.jsq001 | | |
5354
| New Widetech Internet Dehumidifier | nwt.derh.wdh318efw1 | WDH318EFW1 | 2.7L tank, 38dB, 18L/d, 240W |
@@ -458,7 +459,7 @@ This model uses newer MiOT communication protocol.
458459

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

461-
### Air Humidifier MJJSQ and JSQ1 and JSQ5 (deerma.humidifier.mjjsq, deerma.humidifier.jsq1, deerma.humidifier.jsq5)
462+
### Air Humidifier MJJSQ, JSQ1, JSQ5 and JSQS (deerma.humidifier.mjjsq, deerma.humidifier.jsq1, deerma.humidifier.jsq5, deerma.humidifier.jsqs)
462463

463464
* Power (on, off)
464465
* Preset modes (low, medium, high, humidity)

custom_components/xiaomi_miio_airpurifier/fan.py

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
from miio import ( # pylint: disable=import-error
99
AirDogX3,
10-
AirDogX5,
11-
AirDogX7SM,
1210
AirFresh,
1311
AirFreshA1,
1412
AirFreshT2017,
@@ -25,9 +23,7 @@
2523
Fan1C,
2624
FanLeshow,
2725
FanP5,
28-
FanP9,
29-
FanP10,
30-
FanP11,
26+
FanMiot,
3127
)
3228
from miio.airfresh import ( # pylint: disable=import-error, import-error
3329
LedBrightness as AirfreshLedBrightness,
@@ -1179,26 +1175,18 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
11791175
elif model == MODEL_FAN_P5:
11801176
fan = FanP5(host, token, model=model)
11811177
device = XiaomiFanP5(name, fan, model, unique_id, retries)
1182-
elif model == MODEL_FAN_P9:
1183-
fan = FanP9(host, token, model=model)
1184-
device = XiaomiFanMiot(name, fan, model, unique_id, retries)
1185-
elif model == MODEL_FAN_P10:
1186-
fan = FanP10(host, token, model=model)
1187-
device = XiaomiFanMiot(name, fan, model, unique_id, retries)
1188-
elif model == MODEL_FAN_P11:
1189-
fan = FanP11(host, token, model=model)
1178+
elif model in [MODEL_FAN_P9, MODEL_FAN_P10, MODEL_FAN_P11]:
1179+
fan = FanMiot(host, token, model=model)
11901180
device = XiaomiFanMiot(name, fan, model, unique_id, retries)
11911181
elif model == MODEL_FAN_LESHOW_SS4:
11921182
fan = FanLeshow(host, token, model=model)
11931183
device = XiaomiFanLeshow(name, fan, model, unique_id, retries)
1194-
elif model == MODEL_AIRPURIFIER_AIRDOG_X3:
1195-
air_purifier = AirDogX3(host, token)
1196-
device = XiaomiAirDog(name, air_purifier, model, unique_id, retries)
1197-
elif model == MODEL_AIRPURIFIER_AIRDOG_X5:
1198-
air_purifier = AirDogX5(host, token)
1199-
device = XiaomiAirDog(name, air_purifier, model, unique_id, retries)
1200-
elif model == MODEL_AIRPURIFIER_AIRDOG_X7SM:
1201-
air_purifier = AirDogX7SM(host, token)
1184+
elif model in [
1185+
MODEL_AIRPURIFIER_AIRDOG_X3,
1186+
MODEL_AIRPURIFIER_AIRDOG_X5,
1187+
MODEL_AIRPURIFIER_AIRDOG_X7SM,
1188+
]:
1189+
air_purifier = AirDogX3(host, token, model=model)
12021190
device = XiaomiAirDog(name, air_purifier, model, unique_id, retries)
12031191
elif model in [MODEL_FAN_1C, MODEL_FAN_P8]:
12041192
fan = Fan1C(host, token, model=model)

custom_components/xiaomi_miio_airpurifier/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"domain": "xiaomi_miio_airpurifier",
33
"name": "Xiaomi Mi Air Purifier, Air Humidifier, Air Fresh and Pedestal Fan Integration",
4-
"version": "2022.3.3",
4+
"version": "2022.3.3.1",
55
"iot_class": "local_polling",
66
"config_flow": false,
77
"documentation": "https://github.com/syssi/xiaomi_airpurifier",
88
"issue_tracker": "https://github.com/syssi/xiaomi_airpurifier/issues",
99
"requirements": [
1010
"construct==2.10.56",
11-
"python-miio>=0.5.10"
11+
"python-miio>=0.5.11"
1212
],
1313
"dependencies": [],
1414
"codeowners": [

0 commit comments

Comments
 (0)