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.57k stars 646 forks source link

Integration don’t remember colour temperature #844

Open soulcola opened 2 years ago

soulcola commented 2 years ago

Some devices (Xiaomi bedside lamp2, yeelight gu10 bulb color, maybe some other) don’t remember color temperature, every time I open entity, color temperature settings reset. Device only remember rgb color

https://user-images.githubusercontent.com/27709949/196028027-ecdd6f4d-b2b1-4f48-8373-8336851324bd.mov

al-one commented 2 years ago

Show me the entity attributes.

soulcola commented 2 years ago

Shure! 1459DADE-72C4-426E-AB5A-F1040745B904

al-one commented 2 years ago

unavailable ?

soulcola commented 2 years ago

Oh, sorry! I made screenshot when lamp was offline. My bad

min_mireds: 154
max_mireds: 370
effect_list:
  - Color
  - Ct
supported_color_modes:
  - brightness
  - color_temp
  - hs
  - onoff
color_mode: hs
brightness: 255
hs_color:
  - 33.589
  - 81.961
rgb_color:
  - 255
  - 163
  - 45
xy_color:
  - 0.555
  - 0.405
effect: Ct
model: yeelink.light.colorc
lan_ip: 192.168.50.139
mac_address: B4:60:ED:5D:BA:F1
entity_class: MiotLightEntity
miot_type: urn:miot-spec-v2:device:light:0000A001:yeelink-colorc:1:0000C814
light.on: true
light.brightness: 100
light.color_temperature: 3247
light.color: 16753454
light.mode: 2
state_updater: lan
friendly_name: Лампа коридор light
supported_features: 55
soulcola commented 2 years ago

No idea, man? It seems that color_mode is always hs and dont't switches to color_temp

soulcola commented 1 year ago

Still no changes. Device only remember color, but not color temperature

al-one commented 1 year ago

Fixed in https://github.com/al-one/hass-xiaomi-miot/commit/5cfe22f88a5059592d0f578b99af639a621fc02a