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

Possibility to not creating area #30

Closed
antoweb opened this issue Oct 22, 2021 · 11 comments
Closed

Possibility to not creating area #30

antoweb opened this issue Oct 22, 2021 · 11 comments

Comments

@antoweb
Copy link

antoweb commented Oct 22, 2021

Please add the option to not automatic create an area when starting HA

After removed area loke kitchen or bathroom (automatic created from integration), restarting HA cause a re-creation

@ofalvai
Copy link
Owner

ofalvai commented Oct 23, 2021

I think this is a bug in Home Assistant Core and not in this integration.

This integration just adds a suggested_area to the device info object: https://github.com/ofalvai/home-assistant-candy/blob/main/custom_components/candy/sensor.py#L59

The device registry documentation doesn't mention anything about deleting areas, just the fact that I can add a suggested area: https://developers.home-assistant.io/docs/device_registry_index/#device-properties

I recommend opening an issue in the HA core repository.

@ofalvai ofalvai closed this as completed Oct 23, 2021
@antoweb
Copy link
Author

antoweb commented Oct 23, 2021

Are you sure? Others integrations like local tuya or iphonedetect not create area in automatic

@ofalvai
Copy link
Owner

ofalvai commented Oct 23, 2021

Maybe these integrations don't provide a suggested area. I wouldn't remove the suggested area field just because of this bug, I think it's a useful feature.

@antoweb
Copy link
Author

antoweb commented Oct 24, 2021

Issue opened but HA says "is not a bug but by design" :-)

home-assistant/core#58311 (comment)

@antoweb
Copy link
Author

antoweb commented Oct 24, 2021

For your info developers of HA says that the beahvior is normal:
"Yes, unless the device is manually set to the correct area, it will use the suggested area for the integration. If such a suggested area doesn't exists, it will be created."

@antoweb
Copy link
Author

antoweb commented Nov 1, 2021

Any news?

@ofalvai
Copy link
Owner

ofalvai commented Nov 1, 2021

If this behavior is by design, then I can't do anything unfortunately.

@antoweb
Copy link
Author

antoweb commented Nov 1, 2021

Yes you can remove from code the suggested area for example?

@ofalvai
Copy link
Owner

ofalvai commented Nov 5, 2021

That would remove a useful feature for others, so I don't want to do that. I recommend working around the behavior, eg. creating a placeholder area and assigning the Candy appliance to that, this way you can avoid the suggested area popping up.

@antoweb
Copy link
Author

antoweb commented Nov 5, 2021

Ok but the placeholer area xcannot be removed from lovelace dashboard.
Ok no problem, can you tell me please wich part of code i can comment/remove from python to avoid this behavior, so i can edot muself the code files.
Thanks

@ofalvai
Copy link
Owner

ofalvai commented Nov 5, 2021

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

2 participants