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

Make Stateless Programmable Switches for events optional #56

Closed
luigi-lauro opened this issue May 6, 2021 · 3 comments
Closed

Make Stateless Programmable Switches for events optional #56

luigi-lauro opened this issue May 6, 2021 · 3 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request wontfix This will not be worked on

Comments

@luigi-lauro
Copy link

Description of Enhancement

As per title, just a small suggestion to further improve this fantastic plugin: I think not everyone needs to have all the programmable switches, with confusing numeric labels due also to Home app limitations, for automation. I think as we have options in UI to disable the manual program switches for every appliances, we should also have an option to disable the events switches for every appliances, to avoid spamming homekit with many unused/confusing switches, and just activate them for the appliances where it's needed for automation purposes. A per-appliance option would be perfect, but even a global one would work in my case. Even better a per-event option, but I think this is probably overkill and unneeded.

@luigi-lauro luigi-lauro added the enhancement New feature or request label May 6, 2021
@thoukydides
Copy link
Owner

Sorry, but no. (At least not at the current time.)

Whilst I appreciate the reasons for this request... and other people have requested the same thing (e.g. #31)... I am not currently willing to go down the route of adding extra configurability.

In general, I am only willing to invest effort on functionality that (i) I use myself, (ii) can be added with minimal effort (e.g. where most of the implementation can be shared with features added for other reasons), or (iii) significantly improve the usability or functionality (e.g. the control of Hood fans using appropriate HomeKit services). The Stateless Programmable Switch services were originally the only part of this plugin that I regularly used myself; it is only with the recent ability to start Oven programs that I use anything else.

It would require significant changes to the plugin to handle this correctly, e.g. removing the unused HomeKit services when the plugin is restarted after the configuration is changed. Unless that is done it would rely on the user deleting the ~/.homebridge/persist/IdentifierCache.XXXXXXXXXXXX.json file, and I already get enough support requests from people who don't bother to read the documentation without the problem of leaving "zombie" HomeKit services.

Whilst I could probably hack that functionality in for the Stateless Programmable Switch services without too much trouble, there would then be an expectation of similar functionality to disable various other features such as the Sabbath Mode Switch for Oven appliances, and the various other Mode Switch services for Freezer/FridgeFreezer/Refrigerator/WineCooler appliances. Implementing that cleanly would require a significant rewrite. It would be even more effort to avoid breaking any existing automations that users have configured due to replacing old services with new ones when the updated plugin is first used.

The configurability for program Switch services was necessary to make them useful, i.e. providing a way to specify the program options. The ability to hide all of the programs came virtually for free with that feature. However, that is not the case here with the Stateless Programmable Switch services .

Finally, I already have an issue with test coverage since much of the functionality of this plugin cannot be exercised using either my own appliances, or the simulators on the developer website. As a result, quite a few releases have introduced serious bugs that I was unable to reproduce, but were immediately apparent to other users. Extra configurability would increase the proportion of code that won't be properly tested prior to release, which will lead to more broken releases, since realistically I will only routinely test the configuration that I use myself.

@thoukydides thoukydides added wontfix This will not be worked on duplicate This issue or pull request already exists labels May 6, 2021
@luigi-lauro
Copy link
Author

Thank you Alex.
All good reasons, I perfectly understand you. Maybe consider for the future at least the global switch for the switches only, I think that will also save you quite a few questions/issues/mails from people puzzled by the behavior, but that's just my idea, your choice :-)
Luigi

@thoukydides
Copy link
Owner

v0.32.0 provides per-appliance configuration options to remove the Stateless Programmable Switch services for appliance events (as well as selectively enabling the Switch services for appliance mode settings and the Door services for the appliance door status).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants