muesli / beehive

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

openweathermap bee: set current weather context #311

Closed rubiojr closed 4 years ago

rubiojr commented 4 years ago

This makes it easier to retrieve the current weather from other actions as long as you have the weather bee running and a chain that periodically gets the current weather (with the cron bee for example).

Example templates:

"Weather in {{.context.weather.current.Name}}: {{(index .context.weather.current.Weather 0).Description}}, {{.context.weather.current.Main.Temp}} ºC"

Would print something like:

Weather in Barcelona: few clouds, 22.57 ºC