technicalpickles / picklehome-homeassistant-config

homeassistant configuration for my house
3 stars 0 forks source link

Cleanup, refactoring to use packages #36

Closed technicalpickles closed 6 years ago

technicalpickles commented 6 years ago

I wanted to look at packages as part of https://github.com/technicalpickles/picklehome-homeassistant-config/issues/31 but got carried away. I moved a bunch of functionality down into packages.

My think was to group related functionality into packages. We ended up with:

After doing that, I ended up with only one script in scripts, so I moved it to a scripts.yaml instead of a directory of yaml. I'm also realizing that having related scripts together is really helpful. It also highlighted the similarities in bath mode and porch mode. I don't know how yet, but I think those 2 can be further refactored to share common functionality.

The circadian rhythm package is pretty big. I am thinking to further clean it up by splitting it into 2, one for detecting the changes in the rhtyhm, and another for actually taking action when they happen. That'd be a lot more digestable I think.

While doing this, I needed to change to style 1 instead of style 2. Since I was doing that for others, I ended up doing it for the man configuration too. And removing a bunch of generated comments. And reorganizing.