Skip to content
New issue

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

Missing Color Temperature Entity for yeelink.light.ceiling20 #2039

Closed
daniel4999 opened this issue Dec 7, 2024 · 13 comments
Closed

Missing Color Temperature Entity for yeelink.light.ceiling20 #2039

daniel4999 opened this issue Dec 7, 2024 · 13 comments
Labels
bug Something isn't working fixed bug fixed

Comments

@daniel4999
Copy link

Device model / 设备型号

Yeelight

Component version / 插件版本

1.0.2

HA core version / HA版本

2024.12.1

Integrated mode / 集成方式

Automatic (自动模式)

The problem / 问题详情

Since the last update, the entity for changing the color temperature of the lamp yeelink.light.ceiling20 has disappeared in Home Assistant. Currently, I can only control the RGB ambient light around the lamp but cannot adjust the main light's color temperature.

Device Details
Device Model: Yeelight Ceiling Lamp (yeelink.light.ceiling20)
Firmware Version: 2.1.7_0030
Component Version: Xiaomi Miot Auto (latest, 7.x)
HA Core Version: 2024.12.1
Integration Mode: Automatic (out-of-box)

Expected Behavior
The integration should expose an entity for adjusting the main light's color temperature in addition to the RGB ambient light control.

Entity attributes / 实体属性

info: Ceiling light
model: yeelink.light.ceiling20
did: 359242518
mac: 54:48:E6:5B:C1:AB
lan_ip: 192.168.1.165
app_link: mihome://device?uid=1545943782&did=359242518
miot_type: urn:miot-spec-v2:device:light:0000A001:yeelink-ceiling20:1
available: true
home_room: Default family group Living Room
icon: mdi:information
updater: local
updated_at: 2024-12-07 10:31:57.235586+01:00
converters: info, light.on, light.brightness, light.color_temperature, light.mode, ambient_light.on, ambient_light.brightness, ambient_light.color_temperature, ambient_light.color, light.off_delay_time
customizes: 
number_properties: off_delay_time
switch_properties: bg_on
extend_miot_specs: yeelink.light.ceiling4

ambient_light.on: false
method: set_properties
params: 
- siid: 200
  piid: 202
  did: '359242518'
  value: 255
- siid: 2
  piid: 2
  did: '359242518'
  value: 255

ambient_light.color_temperature: 4685
ambient_light.color: 14128895
light.on: false
light.color_temperature: 5200
light.mode: 1
light.off_delay_time: 0
ambient_light.brightness: 100
light.brightness: 100
device_class: update
friendly_name: Ceiling light Info

Home Assistant Logs / 系统日志

No response

@niklas2244
Copy link

Same for me

@al-one
Copy link
Owner

al-one commented Dec 12, 2024

Control it in the light entity.

@daniel4999
Copy link
Author

Control it in the light entity.

Unfortunately that does not work, currently changing the entity color/temperature only changes the ambient light ring.
So basically there should be 2 entities present instead of one.

Reverting back to a previous MIOT version brings back full functionality (0.7.24)

@al-one
Copy link
Owner

al-one commented Dec 13, 2024

Show the attributes of each light.

al-one added a commit that referenced this issue Dec 14, 2024
@al-one
Copy link
Owner

al-one commented Dec 14, 2024

Try master branch.

wget -O - https://get.hacs.vip | DOMAIN=xiaomi_miot ARCHIVE_TAG=master bash -

@daniel4999
Copy link
Author

Show the attributes of each light.

Hi,

Thank you for the time.

The attributes for the light in v0.7.22 :

min_color_temp_kelvin: 2702
max_color_temp_kelvin: 6493
min_mireds: 154
max_mireds: 370
effect_list:
  - Day
  - Night
supported_color_modes:
  - color_temp
effect: Day
color_mode: color_temp
brightness: 255
color_temp_kelvin: 2702
color_temp: 370
hs_color:
  - 28.391
  - 65.659
rgb_color:
  - 255
  - 167
  - 88
xy_color:
  - 0.524
  - 0.388
model: yeelink.light.ceiling20
lan_ip: 192.168.1.166
mac_address: 54:48:E6:5B:C1:AB
entity_class: MiotLightEntity
home_room: Default family group Living Room
miot_type: urn:miot-spec-v2:device:light:0000A001:yeelink-ceiling20:1
light.on: true
light.brightness: 100
light.color_temperature: 2703
light.mode: 1
light.off_delay_time: 0
ambient_light.on: true
ambient_light.brightness: 100
ambient_light.color_temperature: 4000
ambient_light.color: 16744448
state_updater: lan
sub_entities:
  - light-2.off_delay_time-102
  - ambient_light-200
friendly_name: Ceiling light Light
supported_features: 36

The attributes in v1.0.4

ax_color_temp_kelvin: 6500
min_mireds: 153
max_mireds: 588
effect_list:
  - Day
  - Night
supported_color_modes:
  - color_temp
  - rgb
friendly_name: Ceiling light Light Switch Status
supported_features: 4
effect: Day
color_mode: color_temp
brightness: 255
color_temp_kelvin: 2335
color_temp: 428
hs_color:
  - 29.346
  - 78.852
rgb_color:
  - 255
  - 152
  - 54
xy_color:
  - 0.564
  - 0.389
ambient_light.color:
  - 255
  - 128
  - 0
ambient_light.color_temperature: 2335
light.color_temperature: 2703
light.mode: Day
ambient_light.brightness: 255

@al-one
Copy link
Owner

al-one commented Dec 14, 2024

@daniel4999 Has the master branch fixed it ?

@daniel4999
Copy link
Author

@daniel4999 Has the master branch fixed it ?

I will try it out tonight and will let you know

@daniel4999
Copy link
Author

@al-one

I'm getting the following error in the logs when trying to set up the master branch MIOT version:

Logger: homeassistant.config_entries
Source: config_entries.py:640
First occurred: 17:39:26 (1 occurrences)
Last logged: 17:39:26

Error setting up entry Xiaomi: 154594354 for xiaomi_miot
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/__init__.py", line 242, in async_setup_entry
    await async_setup_xiaomi_cloud(hass, config_entry)
  File "/config/custom_components/xiaomi_miot/__init__.py", line 288, in async_setup_xiaomi_cloud
    device = await entry.new_device(d)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/hass_entry.py", line 96, in new_device
    await device.async_init()
  File "/config/custom_components/xiaomi_miot/core/device.py", line 177, in async_init
    spec = await self.get_spec()
           ^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_miot/core/device.py", line 308, in get_spec
    self.init_converters()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/config/custom_components/xiaomi_miot/core/device.py", line 360, in init_converters
    attr = p.get('attr', prop.full_name)
           ^^^^^
AttributeError: 'str' object has no attribute 'get'

I have removed the previous version and rebooted HAOS after each step, any idea what I'm doing wrong?

al-one added a commit that referenced this issue Dec 14, 2024
@al-one
Copy link
Owner

al-one commented Dec 14, 2024

Try again.

@daniel4999
Copy link
Author

Works perfectly now! 🎉

@al-one
Copy link
Owner

al-one commented Dec 14, 2024

Fixed in v1.0.5.

@al-one al-one closed this as completed Dec 14, 2024
@daniel4999
Copy link
Author

Much appreciated!

@al-one al-one added bug Something isn't working fixed bug fixed labels Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed bug fixed
Projects
None yet
Development

No branches or pull requests

3 participants