core: Xiaomi Humidifier 2 Led Errors

Home Assistant release with the issue: 0.84.2

Last working Home Assistant release (if known): Never

Operating environment (Hass.io/Docker/Windows/etc.): Docker

Component/platform: https://www.home-assistant.io/components/fan.xiaomi_miio/

Description of problem: in model: zhimi.humidifier.ca1

fan.xiaomi_miio_set_led_brightness - fires errors fan.xiaomi_miio_set_led_off - does nothing, no errors fan.xiaomi_miio_set_led_on - does nothing, no errors

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

  - platform: xiaomi_miio
    host: ip
    token: token
    name: humidifier_name

Traceback (if applicable):

2018-12-21 02:55:39 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140557841910528] Error handling message: {'type': 'call_service', 'domain': 'fan', 'service': 'xiaomi_miio_set_led_brightness', 'service_data': {'entity_id': 'fan.humidifier_kostya', 'brightness': 2}, 'id': 211}
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/components/fan/xiaomi_miio.py", line 499, in _try_command
    partial(func, *args, **kwargs))
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/miio/airhumidifier.py", line 338, in set_led_brightness
    return self.send("set_led_b", [brightness.value])
  File "/usr/local/lib/python3.6/site-packages/miio/device.py", line 272, in send
    raise DeviceError(m.data.value["error"])
miio.exceptions.DeviceError: {'code': -5001, 'message': 'invalid arg'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/components/websocket_api/decorators.py", line 16, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/app/homeassistant/components/websocket_api/commands.py", line 148, in handle_call_service
    connection.context(msg))
  File "/usr/src/app/homeassistant/core.py", line 1121, in async_call
    self._execute_service(handler, service_call))
  File "/usr/src/app/homeassistant/core.py", line 1143, in _execute_service
    await handler.func(service_call)
  File "/usr/src/app/homeassistant/components/fan/xiaomi_miio.py", line 420, in async_service_handler
    await getattr(device, method['method'])(**params)
  File "/usr/src/app/homeassistant/components/fan/xiaomi_miio.py", line 829, in async_set_led_brightness
    self._device.set_led_brightness, LedBrightness(brightness))
  File "/usr/src/app/homeassistant/components/fan/xiaomi_miio.py", line 505, in _try_command
    _LOGGER.error(mask_error, exc)
  File "/usr/local/lib/python3.6/logging/__init__.py", line 1337, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/usr/local/lib/python3.6/logging/__init__.py", line 1444, in _log
    self.handle(record)
  File "/usr/local/lib/python3.6/logging/__init__.py", line 1454, in handle
    self.callHandlers(record)
  File "/usr/local/lib/python3.6/logging/__init__.py", line 1516, in callHandlers
    hdlr.handle(record)
  File "/usr/local/lib/python3.6/logging/__init__.py", line 865, in handle
    self.emit(record)
  File "/usr/src/app/homeassistant/components/system_log/__init__.py", line 130, in emit
    entry = self._create_entry(record, stack)
  File "/usr/src/app/homeassistant/components/system_log/__init__.py", line 113, in _create_entry
    'message': record.getMessage(),
  File "/usr/local/lib/python3.6/logging/__init__.py", line 338, in getMessage
    msg = msg % self.args

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments