Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while setting up xiaomi_viomi platform for vacuum (missing 2 required keyword-only arguments: 'options' and 'unique_id' #53

Open
Turntable67 opened this issue Jul 12, 2024 · 1 comment

Comments

@Turntable67
Copy link

2024-07-12 15:49:37.397 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up xiaomi_viomi platform for vacuum
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/xiaomi_viomi/vacuum.py", line 55, in async_setup_platform
entry = ConfigEntry(
^^^^^^^^^^^^
TypeError: ConfigEntry.init() missing 2 required keyword-only arguments: 'options' and 'unique_id'

@Turntable67
Copy link
Author

Fixed this by adding these missing arguments to the vacuum.py

entry = ConfigEntry(
domain=PLATFORM_NAME,
data=config,
version=2,
title=config[CONF_NAME],
source=SOURCE_USER,
options={}, # Add default or specific options here
unique_id=config.get(CONF_NAME, "xiaomi_viomi_vacuum"), # Provide a unique identifier

)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant