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.73k stars 669 forks source link

yeelink.light.lamp9 灯光模式(Light.mode)无法调整 #1898

Open starskyzheng opened 1 month ago

starskyzheng commented 1 month ago

Device model / 设备型号

yeelink.light.lamp9

Component version / 插件版本

0.7.20

HA core version / HA版本

2024.8.3

Integrated mode / 集成方式

Local (本地模式)

The problem / 问题详情

正确的逻辑应该是:Light.mode白天为1;黑夜为2 前端的逻辑是:Light.mode白天为0;黑夜为1 属性里的Light.mode显示是正确的。 通过HA网页调整灯光模式,始终是白天模式。 用小米app调整为黑夜模式后,再用HA调整就变回白天模式。 可以使用service正确调整,感觉是前端出错了。

  service: xiaomi_miot.set_property
  data:
    entity_id: light.yeelink_lamp9_XXXX_light
    field: light.mode
    value: 2

Entity attributes / 实体属性

Model
yeelink.light.lamp9
Lan IP
192.168.x.x
MAC address
AA:BB:CC:DD:EE:FF
Entity class
MiotLightEntity
Home room
Room
Miot type
urn:miot-spec-v2:device:light:0000A001:yeelink-lamp9:1
Light.on
false
Light.brightness
100
Light.color temperature
3,900
Light.mode
1
State updater
lan

Home Assistant Logs / 系统日志

无报错