core icon indicating copy to clipboard operation
core copied to clipboard

Refactor business logic into controller(s)

Open marcelveldt opened this issue 3 years ago • 3 comments

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 avatar Jan 10 '21 19:01 marcelveldt

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

marcelveldt avatar Jan 11 '21 11:01 marcelveldt

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.

alexyao2015 avatar Jan 11 '21 21:01 alexyao2015

Stale issue message

github-actions[bot] avatar Mar 13 '21 02:03 github-actions[bot]