FoundersFounders / door-services

IoT project for the doorbell and door-open services here at FoundersFounders.
MIT License
14 stars 6 forks source link

Move doorTimes settings to the config, into "slackBot" where value is read by the DoorSlackBot class. #25

Closed MiguelQueiroz closed 6 years ago

MiguelQueiroz commented 7 years ago

Yep, when i edited the commits using the github web, i wasn't aware that i was creating new patch branches. Only later in the day when i actually cloned the repo to by desktop, source control tool, i saw the mess, sorry for that. :S

This patch-7 branch, is a cleaner version of the doorTime feature. I had doubts about where to put the doorTimes config, since all the 3 arguments in the interface were not getting the config file as a whole, indeed "config" parameter returns just true if i'm not wrong... which is weird, because it is a waste.

But hey, if you find a better solution, go ahead. This was just my suggestion. And it works.

I also suggest later on, that the check for lock time, to be a atomic method, so we can just call it with a single line within the "interface"