Our most popular smart lights Applets just got a major upgrade using a query from the Weather Underground service and filter code.
See the upgrade in action.
The IFTTT Team edited this popular Applet and added new filter code. If it's sunny outside, the Applet will skip its action. This way, the Applet action only fires when you actually need your lights on.
This Applet upgrade is available for all the lighting services on IFTTT. Use the filter code to make your own, or enable the Applets we published.
- Turn on my Hue lights when I arrive home unless it's still light outside
- Turn on the lights when you get home, unless it's sunny outside
- Turn on my Govee lights when I get home, unless it's sunny outside
- Turn on the lights when you arrive home, unless it's bright outside
- Turn on the light when I get home, unless it's sunny outside
- Turn on your lights when you arrive home, unless it's sunny outside
- Turn on lights when I am home unless it's sunny outside
All IFTTT users can edit existing Applets and enable an unlimited number of Published Applets. Search through the Explore page to find an existing Applet to make your own.
The IFTTT Team edited this lighting Applet based on requests from our community. We used filter code to specify which conditions are favorable for this Applet to run its action. If it's sunny outside, then the Applet will skip its action. Whenever skies are dark or the sun has already set, then the Applet will run.
Use this filter code with the other lighting services on IFTTT by replacing the action "Hue.turnOnAllHue.skip" with the desired action.
Filter Code Write JavaScript code to override action fields and skip actions. All actions will run unless you explicitly skip them. Check out this help center article for more information and examples.
let sunrise = moment(Weather.currentWeather[0].SunriseAt); let sunset = moment(Weather.currentWeather[0].SunsetAt); let currentTime = Meta.currentUserTime; let afterSunrise = currentTime.isAfter(sunrise); let beforeSunset = currentTime.isBefore(sunset); if (afterSunrise && beforeSunset) { Hue.turnOnAllHue.skip(`Its still daytime so we're leaving the lights off`); }