Auto Technology how to add two "if this" in ifttt

Discussion in 'HomeKit, HomePod, CarPlay, Home & Auto Technology' started by Trixster, Nov 26, 2018.

  1. Trixster macrumors member

    May 18, 2009
    Is there a way to add two "if this" commands to the IFTTT app in iOS?
    I´d like to add a command that turns on my Telldus lights if I get home after dark, so in essence I need to add both the location (arriving home) and a time (after 16:00) then my lights turn on. But as of now I can only add one "if this" command, so either the location or the time, not both... is there a way around this?
  2. chown33, Nov 26, 2018
    Last edited: Nov 26, 2018

    chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    In conventional programming, what you're asking for is called a "nested if", or if there are logical operators available, a boolean condition.

    A quick google of ifttt nested if finds this article:

    There are other results, so it's worthwhile doing the search yourself.

    I've never used ifttt myself, so I can't say if there's a simpler way to accomplish the goal. Personally, the inability to use boolean operators as conditionals (A and B, A or B) would be a pretty big show-stopper for me.

    This is your stated conditional:
    both the location (arriving home) and a time (after 16:00) then my lights turn on.​

    The word "and" is the boolean operator. If that exists in ifttt then use that.

    To structure a nested if from the conditional:
    if ( arriving home ) then
    if ( after 16:00 ) then
    turn lights on​

    The indentation shows which statements are conditioned on a preceding statement.

    The AND is implicit in this structure, where "turn lights on" must first satisfy 2 conditions.
  3. Trixster thread starter macrumors member

    May 18, 2009
    Thanks! I´ll give it a try.
    I agree that the "nested if" is a pretty big downside of ifttt, but the fact that ifttt supports just about every automation hardware available (not really, but a lot more then competing apps) is crucial.
  4. LiveM, Nov 27, 2018
    Last edited: Dec 4, 2018

    LiveM macrumors 65816


    Oct 30, 2015
    I think it’s totally crazy that IFTTT hasn’t become IFT&TTT. Surely Siri Shortcuts or something else will end up killing it if it stays as it is, as it is pretty much useless to HomeKit devices and extremely limiting to everything else.

Share This Page