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

Refactor business logic into controller(s) #71

Open
marcelveldt opened this issue Jan 10, 2021 · 3 comments
Open

Refactor business logic into controller(s) #71

marcelveldt opened this issue Jan 10, 2021 · 3 comments
Labels
confirmed We know what should be done to resolve the issue enhancement New feature or request

Comments

@marcelveldt
Copy link
Collaborator

As this project started relatively small, the business logic for sending commands to HA and process internal "HUE only" commands is now contained into the Hue api. It's time to move this intro separate controllers so we have the benefit of cleaner code and reusable code.

  1. controller for all business logic to HA (such as issue light command, throtling etc.)
  2. controller for all "HUE only" business logic, like the localstorage, scenes etc.

The API will then be just a definition of endpoints, calling actions on he controllers.

@marcelveldt marcelveldt added the enhancement New feature or request label Jan 10, 2021
@alexyao2015 alexyao2015 added immediate attention Pressing issues to attend to first confirmed We know what should be done to resolve the issue labels Jan 11, 2021
@marcelveldt marcelveldt removed the immediate attention Pressing issues to attend to first label Jan 11, 2021
@marcelveldt
Copy link
Collaborator Author

Remove the immediate attention label as this is no show stopper but just annoying ;-)

@alexyao2015
Copy link
Member

I think as part of this, we should create a proper error handler so that we collect all errors that occur in a request and display them out in order. We avoid should sending anything but proper hue errors.

@github-actions
Copy link
Contributor

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed We know what should be done to resolve the issue enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants