hass-emulated-hue / core

Hue Emulation for Home Assistant
Apache License 2.0
332 stars 56 forks source link

Refactor business logic into controller(s) #71

Open marcelveldt opened 3 years ago

marcelveldt commented 3 years ago

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 commented 3 years ago

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

alexyao2015 commented 3 years ago

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[bot] commented 3 years ago

Stale issue message