We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xiaomi.airp.mp4
0.7.19
2024.7.2
Local (本地模式)
小米空气净化器4 无法打开屏幕或者设置亮度,只能关闭
preset_modes: - Auto - Sleep - Favorite - None percentage: 66 percentage_step: 33 preset_mode: None model: xiaomi.airp.mp4 lan_ip: redacted mac_address: redacted entity_class: MiotFanEntity home_room: redacted exclude_miot_services: - custom_service miot_type: urn:miot-spec-v2:device:air-purifier:0000A007:xiaomi-mp4:1 air_purifier.on: true air_purifier.fault: 0 air_purifier.mode: 6 air_purifier.fan_level: 1 air_purifier.anion: true rfid.rfid_tag: redacted rfid.rfid_factory_id: redacted rfid.rfid_product_id: "16" rfid.rfid_time: redacted rfid.rfid_serial_num: redacted air_purifier_favorite.fan_level: 10 screen.brightness: 2 physical_controls_locked: false alarm: true filter.filter_life_level: 41 filter.filter_used_time: 2089 filter.filter_left_time: 1411 environment.relative_humidity: 71 environment.temperature: 27 environment.air_quality: 0 environment.pm2_5_density: 1 state_updater: lan sub_entities: - environment-3.relative_humidity-1 - environment-3.temperature-2 - environment-3.pm2_5_density-4 - filter-4.filter_life_level-1 - air_purifier-2.anion-6 - alarm-6.alarm-1 - screen-13 - environment-3.air_quality-3 - filter-4.filter_used_time-2 - filter-4.filter_left_time-3 - physical_controls_locked-8.physical_controls_locked-1 icon: mdi:air-purifier friendly_name: Xiaomi Smart Air Purifier 4 Air Purifier supported_features: 9
N/A
The text was updated successfully, but these errors were encountered:
实测以下service 可以控制亮度:
service: xiaomi_miot.set_miot_property data: entity_id: fan.xiaomi_mp4_air_purifier siid: 13 piid: 1 value: 2
可能的 value:
reference: https://home.miot-spec.com/spec?type=urn:miot-spec-v2:device:air-purifier:0000A007:xiaomi-mp4:1
建议把这三个亮度设置为100%, 50% 和0%。就是一个brightness step 为50%的灯实体。或者更好的方式是设置一个下拉式选单 (dropdown)以设置亮度。
Sorry, something went wrong.
估计是因为代码里面直接把0, 1, 2 三种模式map 到亮度0%, 1%, 2%。
关掉屏幕亮度理应是0%,但是回传数据是模式2 (屏幕关闭),map 到了亮度 = 2%。不过一个关掉的灯不应该有2%亮度,导致HA 认为灯还在开。
可行的解决方法可能是类似这样:
brightness = [1, 0.5, 0][miot_brightness_mode] #通过 list index 的方式返回适合的数值
No branches or pull requests
Device model / 设备型号
xiaomi.airp.mp4
Component version / 插件版本
0.7.19
HA core version / HA版本
2024.7.2
Integrated mode / 集成方式
Local (本地模式)
The problem / 问题详情
小米空气净化器4 无法打开屏幕或者设置亮度,只能关闭
Entity attributes / 实体属性
Home Assistant Logs / 系统日志
N/A
The text was updated successfully, but these errors were encountered: