al-one / hass-xiaomi-miot

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成
https://miot-spec.com
Apache License 2.0
4.67k stars 664 forks source link

Adjusting Screen/Light options in Mi Air Purifier 3C #1868

Closed Kalindro closed 2 months ago

Kalindro commented 2 months ago

Device model / 设备型号

zhimi.airp.mb4a

Component version / 插件版本

0.7.20

HA core version / HA版本

2024.9.2

Integrated mode / 集成方式

Automatic (自动模式)

The problem / 问题详情

How can I edit screen brightness? I see it's in entity attributes and miot-spec, but I see no such entity it is in. Is there any way to modify it just as any other entity? https://home.miot-spec.com/spec/zhimi.airp.mb4a Screenshot 2024-09-18 202353 image

Entity attributes / 实体属性

preset_modes: Auto, Sleep, Favorite
preset_mode: Sleep
model: zhimi.airp.mb4a
lan_ip: 192.168.10.12
mac_address: 58:B6:23:72:AE:FE
entity_class: MiotFanEntity
miot_type: urn:miot-spec-v2:device:air-purifier:0000A007:zhimi-mb4a:1
air_purifier.on: true
air_purifier.fault: null
air_purifier.mode: 1
custom_service.moto_speed_rpm: 388
custom_service.miio_lib_version: Jerry Yang . Ver: 1.9.6. Date: Jul 18 2021. Time: 11:48:10.
custom_service.favorite_speed: 2000
aqi_updata_heartbeat-9-4: 0
physical_controls_locked: false
screen.brightness: 3
alarm: true
filter.filter_life_level: 2
filter.filter_used_time: 3441
environment.pm2_5_density: 11
state_updater: lan
sub_entities: environment-3.pm2_5_density-4, filter-4.filter_life_level-1, air_purifier-2.on-1, alarm-6.alarm-1, custom_service-9.favorite_speed-3, filter-4.filter_used_time-3, physical_controls_locked-8.physical_controls_locked-1
friendly_name: Mi Air Purifier 3C Air Purifier
supported_features: 56

Home Assistant Logs / 系统日志

No response

Kalindro commented 2 months ago

The brightness can be set by action xiaomi_miot.set_miot_propety, with correct ssid, piid and value taken from miot-spec webpage. image