muesli / beehive

A flexible event/agent & automation system with lots of bees 🐝
GNU Affero General Public License v3.0
6.27k stars 320 forks source link

Sunrise/Sunset events hive #301

Closed rubiojr closed 4 years ago

rubiojr commented 4 years ago

Send sunrise/sunset events for a given city.

muesli commented 4 years ago

Oh yes! I so need this hive!

muesli commented 4 years ago

Similar to what the IRCBee is doing with its connected state, we could emit the current state (after sunrise / after sunset), so it can be accessed by all other chains, even ones not triggered by this bee's events.

See https://github.com/muesli/beehive/blob/master/bees/ircbee/ircbee.go#L261

rubiojr commented 4 years ago

Similar to what the IRCBee is doing with its connected state, we could emit the current state (after sunrise / after sunset), so it can be accessed by all other chains, even ones not triggered by this bee's events.

@muesli TIL, that's pretty awesome. Is abd067ec3d7c2007f90a1fe42978d8fa01c534da what you had in mind?

muesli commented 4 years ago

@muesli TIL, that's pretty awesome. Is abd067e what you had in mind?

Yes, that looks about right! Now you should be able to use .context.beename.sunset (e.g.) as a value in any action.

muesli commented 4 years ago

I'm so gonna drop TravisCI and replace it with GitHub Actions. It's still trying to boot up the macOS jobs from several hours ago :yawning_face:

rubiojr commented 4 years ago

Ready for :eyes:

rubiojr commented 4 years ago

I think I've addressed all your feedback @muesli