Yeelight lag time for state

Yes, you are right, only unavailable.
Now I have only discovery configuration, it work better, but sometimes, I’ve got errors like that:

2018-05-08 16:34:34 ERROR (Thread-13) [homeassistant.components.light.yeelight] Unable to turn the bulb off: Bulb closed the connection.
2018-05-08 16:34:34 DEBUG (Thread-21) [yeelight.main] Bulb<10.0.4.190:55443, type=BulbType.Color> > {‘id’: 328, ‘method’: ‘set_power’, ‘params’: [‘off’, ‘smooth’, 350]}
2018-05-08 16:34:34 DEBUG (Thread-21) [yeelight.main] Bulb<10.0.4.190:55443, type=BulbType.Color> < {‘result’: [‘ok’], ‘id’: 328}
2018-05-08 16:34:34 DEBUG (Thread-15) [yeelight.main] Bulb<10.0.4.190:55443, type=BulbType.Color> > {‘id’: 329, ‘method’: ‘get_prop’, ‘params’: [‘power’, ‘bright’, ‘ct’, ‘rgb’, ‘hue’, ‘sat’, ‘color_mode’, ‘flowing’, ‘delayoff’, ‘music_on’, ‘name’]}
2018-05-08 16:34:34 DEBUG (Thread-22) [yeelight.main] Bulb<10.0.4.190:55443, type=BulbType.Color> < {‘method’: ‘props’, ‘params’: {‘power’: ‘off’}}
2018-05-08 16:34:34 DEBUG (Thread-22) [yeelight.main] Bulb<10.0.4.190:55443, type=BulbType.Color> < {‘result’: [‘off’, ‘100’, ‘3436’, ‘16711680’, ‘359’, ‘100’, ‘2’, ‘0’, ‘0’, ‘0’, ‘’], ‘id’: 329}
2018-05-08 16:34:34 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall light.turn_on: brightness_pct=100.0, entity_id=[‘light.yeelight_rgb_7811dca5deeb’, ‘light.yeelight_rgb_7811dcd94504’]>
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/yeelight/main.py”, line 299, in send_command
data = self._socket.recv(16 * 1024)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py”, line 1002, in _event_to_service_call
await service_handler.func(service_call)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/init.py”, line 360, in async_handle_light_service
await light.async_turn_on(**params)
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/yeelight.py”, line 483, in turn_on
self.set_default()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/yeelight.py”, line 115, in _wrap
return func(self, *args, **kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/yeelight.py”, line 355, in set_default
self._bulb.set_default()
File “”, line 2, in set_default
File “/srv/homeassistant/lib/python3.5/site-packages/yeelight/main.py”, line 58, in _command
result = self.send_command(method, params).get(“result”, [])
File “/srv/homeassistant/lib/python3.5/site-packages/yeelight/main.py”, line 302, in send_command
self.__socket.close()
AttributeError: ‘NoneType’ object has no attribute ‘close’