I’m looking at the Sunrise/Sunset smartapp, and it’s really annoying how so much of the event generation logic has been offloaded into the smartapp itself. Why can’t I just attach an event handler for sunset or runrise event using a typical subscribe()?
We should have this capability for a number of time/astronomical features, such as day of week, season, etc.
I totally agree, but ultimately what you would want is this: http://build.smartthings.com/forums/topic/smartlibrary-shared-library-code/
That way, SmartThings (or someone else) could provide a library which encapsulates these frequently used patterns to promote code sharing and keep SmartApps as succinct as possible.
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
3
Great idea, and, yes, this now has been added to the Platform: