Repository navigation
Description
Nixpkgs version
- Unstable (26.05)
Describe the bug
python-roborock requires home assistant 2026.3 which hasn't been updated yet. This causes vacuum entities to become unavailable, and thus unusable in home-assistant.
Currently home-assistant is at 2026.2.3, which specifies python-roborock==4.8.0
The latest version that seems to work from my testing testing is 4.15.0
After this a breaking change was introduced that causes home-assistant 2026.2.3 to fail to work, however this is fixed in 2026.3.0 where the package is updated to 4.17.1
I think this means we either need to override the home assistant package until it's updated, or downgrade python-roborock.
pyrate-limiter also appears to be required to be downgraded as the older versions require 3.x but nixpkgs now ships 4.x.
Steps to reproduce
- Enable Home Assistant
- Add the roborock component
- In the Home Assistant UI add a vacuum
- Check the logs and see the error, and that the vacuum is unavailable.
Expected behaviour
The vacuum should be available and no stack trace should appear.
Screenshots
No response
Relevant log output
Traceback (most recent call last):
File "/nix/store/gcfdamlgxkd0hfwzjzaz23pmlmjc183j-homeassistant-2026.2.3/lib/python3.13/site-packages/homeassistant/helpers/entity_platform.py", line 680, in _async_add_entities
await self._async_add_entity(
entity, False, entity_registry, config_subentry_id
)
File "/nix/store/gcfdamlgxkd0hfwzjzaz23pmlmjc183j-homeassistant-2026.2.3/lib/python3.13/site-packages/homeassistant/helpers/entity_platform.py", line 915, in _async_add_entity
capabilities=entity.capability_attributes,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/gcfdamlgxkd0hfwzjzaz23pmlmjc183j-homeassistant-2026.2.3/lib/python3.13/site-packages/homeassistant/components/vacuum/__init__.py", line 285, in capability_attributes
return {ATTR_FAN_SPEED_LIST: self.fan_speed_list}
^^^^^^^^^^^^^^^^^^^
File "/nix/store/gcfdamlgxkd0hfwzjzaz23pmlmjc183j-homeassistant-2026.2.3/lib/python3.13/site-packages/homeassistant/components/roborock/vacuum.py", line 157, in fan_speed_list
return self._device_status.fan_power_options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'StatusTrait' object has no attribute 'fan_power_options'. Did you mean: 'fan_speed_options'?Additional context
- PR that broke it here #495067
There's a pending PR to update it again, which I will just ping for notice :) #500320
System metadata
- system:
"x86_64-linux" - host os:
Linux 6.19.8, NixOS, 26.05 (Yarara), 26.05.20260314.e802360 - multi-user?:
yes - sandbox:
yes - version:
nix-env (Lix, like Nix) 2.94.0 System type: x86_64-linux Additional system types: aarch64-linux, i686-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/melody/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/melody/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/melody/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/melody/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/0zqbw17irvj0c71wn6cjbmcg2v04gzvd-lix-2.94.0/share - nixpkgs:
/nix/store/iyzvfr3ifmgaliazg1vc5jdsp0m760rk-source
Notify maintainers
Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)
I assert that this issue is relevant for Nixpkgs
- I assert that this is a bug and not a support request.
- I assert that this is not a duplicate of an existing issue.
- I assert that I have read the NixOS Code of Conduct and agree to abide by it.
Is this issue important to you?
Add a 👍 reaction to issues you find important.
Activity
home-assistant: pin python-roborock to 4.15.0 for 2026.2.x compatibility
dotlambda commentedon Mar 16, 2026
home-assistant.tests.components.roborockbuilds successfully. I suggest you add a test upstream that would help us detect this in the future.ZeroEcks commentedon Mar 16, 2026
Sorry didn't see 2026.3 was already underway! I'll have a crack at writing a test though.
ZeroEcks commentedon Mar 16, 2026
I confirmed that the mypy checks would have caught this, so I don't think it's worth adding anything upstream. IMO the solution would be that we do some sort of (limited?) mypy check against home assistant components, which would reveal typing errors such as this.
Writing an upstream test would just pointlessly duplicate the work of the existing typings, which they do check upstream, but we (intentionally?) do not.
You can confirm this by adding
and any other relevant dependencies into
home-assistant/tests.nixthen runningnix-build -A home-assistant.tests.components.roborockwith a downgraded and non-downgraded version of the package.Broken (non-downgraded)
Downgraded
We can obviously see that "just run the mypy linter" is not the silver bullet (ie. it fails in both), but we can clearly see how it would have caught this.
I reckon if possible, it would be good to take advantage of the fairly decent looking typings between these projects? Home assistant runs mypy in CI too, so it should work (at least one of these is due to our patch causing a linting error, I can only assume the unused-ignore part is probably covered in the pyproject or something)
Here's an example partial run of mypy on upstream's CI, showing that it should be possible and expected we can pass these checks.
SuperSandro2000 commentedon Mar 16, 2026
We never run linters like mypy, black, flake8 or ruff and as you have shown, we would need to exclude quite some things to even get it passed here. We are usually interested in functional tests, as linter updates often cause regressions and create quite a lot of churn.
Upstream probably runs so fast because they 36 MB of mypy cache.