Skip to content

Xiaomi Miio: dmaker.fan.1c never changes status to off after disabling since 2025.6.0 #146668

Closed as duplicate of#146571
@xionc666

Description

@xionc666

The problem

After update to 2025.6.0 the fan has [off, 1, 2, 3] speed control options instead of percentage, which is desired. Changing to [off] disables the device, but Home Assistant presents the state as "on". Turning the device on again is not possible.

What version of Home Assistant Core has the issue?

core-2025.6.0

What was the last working version of Home Assistant Core?

core-2025.5.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Xiaomi Miio

Link to integration documentation on our website

https://www.home-assistant.io/integrations/xiaomi_miio

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

2025-06-12 19:20:06.299 ERROR (SyncWorker_5) [miio.miioprotocol] Got error when receiving: timed out
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 214, in send
    self._handle_error(payload["error"])
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 274, in _handle_error
    raise RecoverableError(error)
miio.exceptions.RecoverableError: {'code': -9999, 'message': 'user ack timeout'}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 214, in send
    self._handle_error(payload["error"])
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 274, in _handle_error
    raise RecoverableError(error)
miio.exceptions.RecoverableError: {'code': -9999, 'message': 'user ack timeout'}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 214, in send
    self._handle_error(payload["error"])
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 274, in _handle_error
    raise RecoverableError(error)
miio.exceptions.RecoverableError: {'code': -9999, 'message': 'user ack timeout'}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 193, in send
    data, addr = s.recvfrom(4096)
                 ~~~~~~~~~~^^^^^^
TimeoutError: timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/entity.py", line 107, in _try_command
    result = await self.hass.async_add_executor_job(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        partial(func, *args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.13/site-packages/miio/click_common.py", line 184, in _wrap
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python3.13/site-packages/miio/integrations/fan/dmaker/fan_miot.py", line 465, in set_speed
    return self.set_property("fan_level", speed)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/miio/miot_device.py", line 152, in set_property
    return self.send(
           ~~~~~~~~~^
        "set_properties",
        ^^^^^^^^^^^^^^^^^
        [{"did": property_key, **mapping[property_key], "value": value}],
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/miio/device.py", line 107, in send
    return self._protocol.send(
           ~~~~~~~~~~~~~~~~~~~^
        command, parameters, retry_count, extra_parameters=extra_parameters
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 248, in send
    return self.send(
           ~~~~~~~~~^
        command,
        ^^^^^^^^
    ...<2 lines>...
        extra_parameters=extra_parameters,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 248, in send
    return self.send(
           ~~~~~~~~~^
        command,
        ^^^^^^^^
    ...<2 lines>...
        extra_parameters=extra_parameters,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 248, in send
    return self.send(
           ~~~~~~~~~^
        command,
        ^^^^^^^^
    ...<2 lines>...
        extra_parameters=extra_parameters,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/miio/miioprotocol.py", line 241, in send
    raise DeviceException("No response from the device") from ex
miio.exceptions.DeviceException: No response from the device
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/logging/handlers.py", line 1509, in emit
    self.enqueue(self.prepare(record))
                 ~~~~~~~~~~~~^^^^^^^^
  File "/usr/local/lib/python3.13/logging/handlers.py", line 1491, in prepare
    msg = self.format(record)
  File "/usr/local/lib/python3.13/logging/__init__.py", line 998, in format
    return fmt.format(record)
           ~~~~~~~~~~^^^^^^^^
  File "/usr/local/lib/python3.13/logging/__init__.py", line 711, in format
    record.message = record.getMessage()
                     ~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/logging/__init__.py", line 400, in getMessage
    msg = msg % self.args
          ~~~~^~~~~~~~~~~
TypeError: not all arguments converted during string formatting
Call stack:
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 227, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 213, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 706, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 677, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2034, in _run_once
    handle._run()
  File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 1243, in async_set_percentage
    result = await self._try_command(
  File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/entity.py", line 112, in _try_command
    _LOGGER.error(mask_error, exc)
  File "/usr/local/lib/python3.13/logging/__init__.py", line 1548, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/usr/local/lib/python3.13/logging/__init__.py", line 1664, in _log
    self.handle(record)
  File "/usr/local/lib/python3.13/logging/__init__.py", line 1680, in handle
    self.callHandlers(record)
  File "/usr/local/lib/python3.13/logging/__init__.py", line 1736, in callHandlers
    hdlr.handle(record)
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 113, in handle
    self.emit(record)
Message: 'Setting fan speed percentage of the miio device failed.'
Arguments: (DeviceException('No response from the device'),)

Additional information

Image

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions