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

Group Sonos Alarm with Sonos devices #26

Merged
merged 2 commits into from
Apr 21, 2021
Merged

Conversation

AaronDavidSchneider
Copy link
Owner

  • Fix device name
  • migrate to new device if room is changed
  • clean up old devices

- migrate to new device if room is changed
- clean up old devices
@AaronDavidSchneider
Copy link
Owner Author

This PR picks up on the discussion in #25 and #24.
I would love to hear your feedback @rasmusbe and @christianschneider89

@christianschneider89
Copy link

christianschneider89 commented Apr 21, 2021

I installed the version and I got following before changing:
image

And this after I changed the room of an an alarm:
image
(I also changed the time from 8 to 7)

Is this behavior correct?

@rasmusbe
Copy link
Contributor

I tried it and it works flawless with room changes.

I also tried removing an alarm and when I did the entity first became "Unavailable"
image
and after a restart it became "Restored"
image

I'm not sure if it is possible to remove the entity completely (since it's never going to come back with the same ID) or if this is the best we can do. Anyways this is a great improvement 👍

@AaronDavidSchneider
Copy link
Owner Author

Thank you for your tests!
I will think about the possibility to remove the entity once not available.
You are totally right. The alarm id will never come back anyway :D

@AaronDavidSchneider
Copy link
Owner Author

Here we go @christianschneider89 and @rasmusbe.
The devices should now be removed, when the alarm is deleted.
Can you confirm?

@rasmusbe
Copy link
Contributor

Works great while HA is running but I also tried to remove the alarm while HA was stopped. Then the alarm entity became "Restored" instead of being removed. Not a big deal thou
image

@AaronDavidSchneider
Copy link
Owner Author

Works great while HA is running but I also tried to remove the alarm while HA was stopped. Then the alarm entity became "Restored" instead of being removed. Not a big deal thou
image

Thanks for testing. I don't know how to fix that. But I suppose that will rarely ever happen in reality :D

@rasmusbe
Copy link
Contributor

I totally agree :D

@AaronDavidSchneider AaronDavidSchneider merged commit d45447f into master Apr 21, 2021
@AaronDavidSchneider
Copy link
Owner Author

I released it. Thanks for your help!

@AaronDavidSchneider AaronDavidSchneider deleted the cleaner_devices branch April 21, 2021 18:54
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

Successfully merging this pull request may close these issues.

3 participants