Locale Feedback Forum

623 votes

Not on Conditions

Ability to have NOT on conditions. This is most useful for location (e.g. leaving a location).

Status: under review

The original request here was for a logical NOT operator, although it doesn't make sense to create a logical NOT operator in Locale. Most of the time, NOT isn't the right way of thinking about a Condition. For example, NOT 9 am to 5 pm could be redefined as 5pm to 9am. NOT at work would simply be the Default situation. For the other conditions built-in to Locale, thinking about the problem in a different way usually means that NOT isn't needed. If a Condition truly needs NOT logic, then that should probably be put into the individual Condition's UI itself rather than as part of the Edit Situation screen in Locale.

Although this request is for a NOT operator, I believe the underlying request here is a way of detecting the transition between situations. The strongest use case would be detecting when you've left a particular Location. While Locale can easily detect the transition between situations, providing a UI to allow the user to do something with that transition is extremely complex.

Today, Locale treats situations as a continuous event. When Locale determines that a situation is active, it applies that situation's settings. When leaving a situation, a lower priority situation's settings take precedence (usually the Defaults). This provides a single, consistent behavior that makes Locale easy to understand.

One suggested implementation is to have "On Enter" and "On Exit" settings within a situation. On Enter settings would work like the current settings within Locale, while On Exit would be applied when leaving a situation. But what if the On Exit settings of a situation are in conflict with the On Enter settings of a higher-priority situation? The number of arrangements that the user must think about has just doubled.

We're still evaluating ways to solve the underlying requeste of "leaving a location", without making the UI too complicated...

Carter Admin
  1. Comments
  1. 3

    ... That's not to say, however, that I wouldn't appreciate a "Leaving" condition; although it can be replicated with creative use of the Variables plugin, it would certainly be nice to have that baked in.

  2. 3

    @erciesielski: The situation you've given doesn't require a "not"- it's a "Plugged in" AND "Between [sunset] and [sunrise]" Condition with lower priority given to it than a second condition, "Between [Sunset] and [Sunrise] AND "Plugged in" AND "Location:home."
    You could also achieve a lot more by tossing in the Locale Variables plugin- but the core is the same; you don't need "Not" for the situation you're describing, you just have to thin... more

  3. 3

    The reason I want this feature is because I want to use a "not at home" condition. When "not at home" and plugged in after sunset, I want my screen to dim because I obviously would be driving at night.

  4. 3

    @skylarsutton We are talking about different things: you need only "not" option for each condition with the same whole other logic. This indeed may be done easily.
    I'm trying to change the logic of handling "entering situation" and "leaving situation" on the timeline in cases when we're "in" several situations simultaneousely...

    So in fact two different tasks are under the same "Not on Conditions" topic :-)

  5. 1

    @yvolk - I've seen the API. Every condition responds in one of three ways:
    1) i'm satisfied
    2) i'm not satisfied
    3) i don't know if i'm satisfied

    The "implementation description" is a drop down in the edit situation page with "when condition is met" and "when condition is not met". If it's anything more than that you have WAY overengineered it. When the "not" option is selected just inverse the conditions response:

    1) i'm satisfied becomes "i'm not sati... more

  6. 3

    @skylarsutton Unfortunately it's not so simple :-(
    I've wrote some proposals on implementation of this feature (see below) but returning to them I see that they are far from perfect.
    So the task still needs good implementation description. The idea is not enough.

  7. 1

    I find Carter very confrontational in these discussion forums - and frankly not interested in listening to user feedback. If your users have a need for a not condition (myself included) just make it already and stop arguing with them.

  8. 3

    @Carter “On Enter settings would work like the current settings within Locale, while On Exit would be applied when leaving a situation. But what if the On Exit settings of a situation are in conflict with the On Enter settings of a higher-priority situation?”
    I’ve read Locale-Help once more and I see that in order to describe, how this may be easily understand by User and implemented by programmers, we need to enhance Locale “model” some more. Here are my suggestions:
    1. Situations which “conditions” a... more

  9. 3

    @Carter Let me show you that "Defaults" situation is NOT working as expected at least in some cases.
    You're thinking about timeline on which different "Situations" appear as "islands" on the top of the "Defaults" ocean :-). If this was always a case "Defaults" situation MAY be used for setting ALL "settings" to their default values (although IMHO this is a bad practice to set ALL possible settings so often...)

    But my experience shows that si... more

  10. 3

    I agree that it would be very nice to have "On condition starts" and "On condition ends", would be so flexible! And of cause some checkbox like "Go back to default" and grey out "On condition ends"

  11. 3

    The main reason for me voting for this is so that I can achieve changes when "leaving a specific area" e.g. when I leave work. I think it would be really good if the location condition had a setting for (entry, during or exit) so that you can specify exactly what about the location sets of the triggers.

    I can see some value in also having a NOT operator as well but I think the Leaving a location is more valuable to me.

  12. 3

    I've just wrote comment and my implementation proposal for the "Add new condition type of Leaving Situation" suggestion, and I think my proposal will allow to implement this suggestion ("Not on Conditions") also,
    so in fact votes for both suggestions may be added :-)
    Exuse me for the this crosspost, and cross voting :-)
    ----------------------------
    I support this request,
    and I think that it's implementation will make "situation" description much more intuitive for the... more

  13. 3

    I support this request, and I think that it's implementation will make "situation" description much more intuitive for the User.

    It's really simple to think in these terms:
    - How do I describe situation? ("Condition" in Locale)
    - What should be done on entering the situation? (currently "Settings" in Locale. I propose to rename this to "On entering the situation:")
    - What should be done on leaving the situation? (new group of the same "settings" plu... more

  14. 3

    I actually bought this app thinking this was in there. seems such a basic feature to have.

  15. 3

    Actually i just had another thought.. instead of just having "settings on condition start" and "settings on condition end" what if there was a way to create as many "settings groups" as you wanted.

    to create a settings group you would be prompted for x y and z:

    run z times, every y minutes, starting x minutes after condition start/end
    *note z can be infinite and can't be zero
    *note y isnt necessary if z=1
    *there could also be an option to abort the x delayed event i... more

  16. 3

    wouldnt it be smarter to have a 3rd section when you add a situation to locale? currently for each situation we have conditions and settings. immagine we had instead conditions, settings on condtion start, settings on condition end.

    this way we could say when the condition begins (location equals home) turn on my wifi, but when this condition ends (is no longer true, i.e. when i leave home) turn off the wifi.

    this is similar to defaults but we can set things to happen when specific conditions end... more

  17. 3

    I want to have "Home" vs "Away from Home".

  18. 3

    How about working with DroidMunkey and supporting their work to make this possible? There are a bunch of hurdles that are native to Locale that make setting these up tedious, and not intuitive. I think a partnership endeavor would be effective, and I think they'd love it.

  19. 3

    I'm using the dock plug-in and I have settings that I want to start when I undock my phone. Right now I have to use the "Undocked" condition, which means it's on the majority of the time. I really only want it to trigger something once when I go from docked to undocked. This could not be accomplished using a "not on" condition, so I would like the "leaving situation" condition as a separate feature.

  20. There is a new plugin called "Locale Variables" that will allow you to do stuff like this

    You can set a string (last location = work or was_at_work = true) and then use it as a condition in another plugins.

    Crazy powerful!

powered by UserVoice