Skip to content

Commit

Permalink
add zhimi.airpurifier.amp1 support (#1464)
Browse files Browse the repository at this point in the history
* add rma1 support

* Fix linting

Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
  • Loading branch information
dsh0416 and rytilahti authored Jul 17, 2022
1 parent a6a05f2 commit dacccb3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions miio/integrations/airpurifier/zhimi/airpurifier_miot.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,32 @@
"device-display-unit": {"siid": 14, "piid": 1},
}

# https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-purifier:0000A007:zhimi-rma1:1
_MAPPING_RMA1 = {
# Air Purifier
"power": {"siid": 2, "piid": 1},
"mode": {"siid": 2, "piid": 4},
# Environment
"humidity": {"siid": 3, "piid": 1},
"aqi": {"siid": 3, "piid": 4},
"temperature": {"siid": 3, "piid": 7},
# Filter
"filter_life_remaining": {"siid": 4, "piid": 1},
"filter_hours_used": {"siid": 4, "piid": 3},
"filter_left_time": {"siid": 4, "piid": 4},
# Alarm
"buzzer": {"siid": 6, "piid": 1},
# Physical Control Locked
"child_lock": {"siid": 8, "piid": 1},
# custom-service
"motor_speed": {"siid": 9, "piid": 1},
"favorite_level": {"siid": 9, "piid": 2},
# aqi
"aqi_realtime_update_duration": {"siid": 11, "piid": 4},
# Screen
"led_brightness": {"siid": 13, "piid": 2},
}

# https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-purifier:0000A007:zhimi-rmb1:1
# https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-purifier:0000A007:zhimi-rmb1:2
_MAPPING_RMB1 = {
Expand Down Expand Up @@ -218,6 +244,7 @@
"zhimi.airp.mb5": _MAPPING_VA2, # airpurifier 4
"zhimi.airp.va2": _MAPPING_VA2, # airpurifier 4 pro
"zhimi.airp.vb4": _MAPPING_VB4, # airpurifier 4 pro
"zhimi.airpurifier.rma1": _MAPPING_RMA1, # airpurifier 4 lite
"zhimi.airp.rmb1": _MAPPING_RMB1, # airpurifier 4 lite
"zhimi.airpurifier.za1": _MAPPING_ZA1, # smartmi air purifier
}
Expand Down

0 comments on commit dacccb3

Please sign in to comment.