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

Removed Chromecast devices only remove entities and not devices #40274

Closed
jokerigno opened this issue Sep 18, 2020 · 13 comments
Closed

Removed Chromecast devices only remove entities and not devices #40274

jokerigno opened this issue Sep 18, 2020 · 13 comments

Comments

@jokerigno
Copy link

jokerigno commented Sep 18, 2020

The problem

When a device is no longer availabe the Chromecast integration removes the entity for that device, but doesn't remove the device (which cannot be manually deleted as far as I can tell) via GUI, only manually via .storage.

Environment

  • Home Assistant Core release with the issue: 0.114.4
  • Last working Home Assistant Core release (if known): NA
  • Operating environment (OS/Container/Supervised/Core): OS
  • Integration causing this issue: Cast
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/cast/

Problem-relevant configuration.yaml

Traceback/Error logs

Additional information

@probot-home-assistant
Copy link

Hey there @emontnemery, mind taking a look at this issue as its been labeled with an integration (cast) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@emontnemery
Copy link
Contributor

emontnemery commented Sep 19, 2020

First of all, the issue description is a bit unclear: the entity state is not removed just because a cast device disappears from the network. Instead, the entity will be marked as unavailable.
I also don't think it's reasonable that the device and entity registries are wiped just because a cast device disappears from the network.

@jokerigno please elaborate a bit more on what you expect to happen and when, for example a step by step scenario with what you do and what you expect to happen.

@emontnemery
Copy link
Contributor

emontnemery commented Sep 19, 2020

I can understand the need to be able to remove a device without manually editing the device registry though, is that what you're after?

@jokerigno
Copy link
Author

I can understand the need to be able to remove a device without manually editing the device registry though, is that what you're after?

Yes definitely, sorry for the ambiguity.

Let me give you some additional info with 2 scenarios:

  1. on March I buyer an AVR on Amazon but after some tests I returned it because its performance was not satisfactory. Today I found that this device was still the device list and I had to manually erase it.
  2. I buyed a Nvidia shield: I don't know if it's just me but I found 2 different devices in my list
  • media_player.shield (empty without entities)
    media_player.shield_2 (the one who is working).
    Also in this case I had to manually delete the empty one in .storage.

@jokerigno
Copy link
Author

Any update on this?

@emontnemery
Copy link
Contributor

This can be implemented in the same way as device removal for MQTT: A custom WS API + custom device card for the frontend. A PR would be most welcome.

@jokerigno
Copy link
Author

Unfortunately I'm not a programmer so I don't know how to do it. I hope in a good samaritan during the hacktoberfest :)

@stefanuytterhoeven
Copy link

Any update on this? My google nest mini has problem. It looses wifi connection. The only way to make it work again, is a factory reset. But, in HA, a new device is created every time. So, now i have about 7 devices (and counting) of the nest mini. Only one is correct. I see no way how to remove the other devices. The entitities, I could remove, but not the device.

@emontnemery
Copy link
Contributor

Implemented in two PRs: backend #43635 + frontend home-assistant/frontend#7817.

@hmmbob
Copy link
Contributor

hmmbob commented Feb 18, 2021

Hi @emontnemery, last week I changed my (cast enabled) soundbar, and tried to remove the old device. I couldn't, and that makes sense as the attached PR seems to be closed because of 'stale', instead of merged.

Any chance there will be functionality built in to remove devices? Or is my best option to grab a text editor and go into .storage?

@emontnemery
Copy link
Contributor

@hmmbob You're right. #43635 was not merged because it was requested to do something generic instead of adding a custom API for each integration supporting device removal.
For now, the simplest option is to disable the device.

@hmmbob
Copy link
Contributor

hmmbob commented Feb 18, 2021

Ah, I did not catch that discussion. Thanks for answering!

@github-actions
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

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

Successfully merging a pull request may close this issue.

5 participants