I prepared a PR to avoid the error message in future: https://github.com/home-assistant/netdisco/pull/184
Could you provide the model number of the device? It looks like this: MJTD01YL
I prepared a PR to avoid the error message in future: https://github.com/home-assistant/netdisco/pull/184
Could you provide the model number of the device? It looks like this: MJTD01YL
If these errors aren’t periodically it’s fine.
Hello,
The following lamp is not supported at all (Ceiling light 3). Model is YLXD05YL (http://www.yeelight.com/zh_CN/product/eos | https://gearbest.com/flush-ceiling-lights/pp_1163128.html?wid=23).
Log: Unknown miio device found: ServiceInfo(type='_miio._udp.local.', name='yeelink-light-ceiling3_mibt77211360._miio._udp.local.', address=b'\xc0\xa8\x00\xbb', port=54321, weight=0, priority=0, server='yeelink-light-ceiling3_mibt77211358.local.', properties={b'mac': b'XXXXXXXXXXXX', b'epoch': b'1'})
Could you try to enable the yeelight developer api and control the light? Does it work? The error message will disappear in future for all types of yeelights.
Developer mode is on. I can turn the lamp on and off through HA, I can change the brightness and also I can change the color temperature but it’s broken in the same way as the ceiling light 1 (the slider works half the distance) Error when calling <function YeelightLight.set_colortemp at 0x6db22780>: {'code': -5000, 'message': 'general error'}
. The miio error spams every 5 minutes.
Forgot to mention I’m using HA 0.66.1.
Please ignore the spam. The error isn’t important and removed soon. The range of the supported color temperature of the ceiling lamp is pretty small, right? (compared to a yeelight bulb)
You could try to changes these values for testing:
Your ceiling lamp support 2700 upto 6000. Restart Home Assistant and check the color temp slider. Does it work properly now?
YLXD01YL (Ceiling light 1): 2700K-6500K
YLXD05YL (Celing light 3): 2700K-6000K
Yeelight bulb: 1700K-6500K
Changing the component values does fix the problem with the slider.
Perfect! We could extend the yeelight component probably to handle the different specs per device type.
Is someone of the Yeelight Ceiling folks willing to test this new feature:
https://github.com/syssi/yeelight/commit/d9eec023c32572536054d835d3ede5e801aec669
The component is able to detect the device type and provides a proper range for the color temperature.
Hey @syssi guess who got a Yeelight?
There’s an exception in the log that prevents the light from being loaded:
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 311, in _async_add_entity
await entity.async_update_ha_state()
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 222, in async_update_ha_state
attr = self.state_attributes or {}
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/light/__init__.py", line 496, in state_attributes
data[ATTR_MIN_MIREDS] = self.min_mireds
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/light/yeelight.py", line 251, in min_mireds
if self._min_mireds is not None:
AttributeError: 'YeelightLight' object has no attribute '_min_mireds'
Cool! I will fix the issue and will ping you.
Tested! No more of that error.
However, cannot change color temperature from HASS UI. There is an error:
[homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_colortemp at 0x564dc0c0>: {'code': -5000, 'message': 'general error'}
Could you enable the debug log and provide some details?
logger:
default: warn
logs:
custom_components.light.yeelight: debug
yeelight: debug
Sure. The temperature is changing. But the slider responds only till halfway. After halfway on the slider (which seems like max warmth), there are errors in the log and the light stays at the same temp.
https://pastebin.com/raw/9cC86av2
My model is ceiling1 (YLXD01YL).
Alright. I should provide some details about the implementation: Do you know the mDNS name / device_type of your yeelight? If you use auto-discovery we need to make sure your device doesn’t produce a UNKNOWN error at the moment. This error is fixed in a recent version of netdisco which isn’t part of Home Assistant yet. If you have configured your yeelight by a static entry in your configuration.yaml you must add a configuration parameter called “model”. The configuration must look like this:
- platform: yeelight
devices:
192.168.130.25:
name: yeelight bedroom
use_music_mode: False
model: ceiling4
192.168.130.26:
name: yeelight livingroom
use_music_mode: False
model: ceiling
I added the following specs right now:
YEELIGHT_SPECS = {
'white': {'min_kelvin': 2700, 'max_kelvin': 2700},
'rgb': {'min_kelvin': 1700, 'max_kelvin': 6500},
'strip': {'min_kelvin': 1700, 'max_kelvin': 6500},
'bslamp1': {'min_kelvin': 1700, 'max_kelvin': 6500},
'ceiling1': {'min_kelvin': 2700, 'max_kelvin': 6500},
'ceiling2': {'min_kelvin': 2700, 'max_kelvin': 6500},
'ceiling3': {'min_kelvin': 2700, 'max_kelvin': 6000},
'ceiling4': {'min_kelvin': 2700, 'max_kelvin': 6500},
}
I’m not very sure about the different specs. I would be happy if everybody could check his light.
Hey @syssi that pastebin was for manual config entry using model ceiling1. Still showed unknown initially and then switched to color. Will experiment with other models as well.
Did you add the “model” parameter? This is important.