Update to prevent plugin crash on startup due to empty accessories#223
Open
RdyPlayer1 wants to merge 2 commits into
Open
Update to prevent plugin crash on startup due to empty accessories#223RdyPlayer1 wants to merge 2 commits into
RdyPlayer1 wants to merge 2 commits into
Conversation
Set all accessory names to required:true to prevent errors where unnamed accessories cause the plugin to fail to load. Also set default : [] to help prevent creating empty accessories
Created a filter to prevent empty accessory creating from crashing the plugin on startup. Empty accessories may still be created, but they are ignored and the app starts successfully.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If you open the plugin config and don't expand every accessory to click the X to delete it, it creates an empty accessory that causes a crash loop on startup.
I've set all defaults on all accessories to empty and created a filter in the platform to prevent the accessories from being created, though they may still show in the config.json. This prevents the plugin from crashing on start and still shows all configured accessories correctly. I suspect that the phamtom accessory creations is in the way homebridge UI handles boolean entries.
I've also set all name fields to required so that you can't create an accessory without a name and put yourself into a restart loop.