Can you elaborate some more on what doesn’t work? Is it that sometimes the switch doesn’t change and other times it does, it never switches, it ends up in an infinite loop of toggling back and forth?
That may indicate an error between IFTTT and my.openhab. Are there any errors noted on either service?
It is really easy to mess this type of rule up. Particularly if changing Presence_Dinki_Home triggers a similar rule to turn off Presence_Dinki_Work.
Personally, I would not use a bunch of switches and instead use a String Item to represent your location. This has the advantage that there is only one Item to represent your presence, you can easily add new locations to track (e.g. driving, at the gym, etc.) without creating a mess of new switches, and you will be freed from needing this type of rule in the first place since there is only the one Item.
Create your Item:
String Presence_Dinki "Dinki is currently at [%s]"
Then have your IFTTT recipes and other things that detect and report your current location publish where you are as text: (e.g. “home”, “work”, etc.). In your rules that care about your location you would:
if(Presence_Dinki.state.toString == "home") {
// do home stuff
}
else if(Presence_Dinki.state.toString == "work") {
// do work stuff
}
This is kind of a combination of what I call Separation of Concerns and Time of Day design patterns I’ve posted here: