5/16/2023 0 Comments Weather underground ifttt![]() This code takes the sunrise and sunset times from the Weather Underground query, plus the user's current time, and skips the Notifications action if the current time is between sunrise and sunset (when the Sun is up). ![]() (`ISS appears overhead for $ seconds, but you won't see it while the sun is up`) Let beforeSunset = currentTime.isBefore(sunset) Let afterSunrise = currentTime.isAfter(sunrise) Now add the following filter code: let sunrise = moment() Start with the Space - ISS passes over a specific location trigger, add the Weather Underground - Current weather query, and the Notifications - Send a notification from the IFTTT app action. Let's create an example Applet where we want to be notified when the ISS passes over our location, but only when it's after sunset so we can get a chance to see it. In this case, we'll query the sunset and sunrise times in your location, then use filter code to skip the Applet's action while the Sun is still up. With IFTTT Pro+ you can add queries to your Applets to add more context, and filter code to ensure your actions only run when certain conditions are met.
0 Comments
Leave a Reply. |