-
-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IFTTT integration: Listen to all item events if no itemStatus is defined within the trigger #180
base: main
Are you sure you want to change the base?
Conversation
…ned within the trigger Signed-off-by: Patrick Fink <[email protected]>
Hi, looking at the code it looks like IFTTT is polling for both the item name AND the state is wants to be triggered on, so this would break that, no? |
Hi! It's correct IFTTT polls for item name and status. This implementation does the following: If the status IFTTT polls for is empty (this happens if the user did not enter anything within the field "item status" on IFTTT-side), the status will not be treated as a filter criterion anymore. To sum it up, current situation: If the user leaves the field "status" within the IFTTT configuration blank, IFTTT polls for events related to an item with the state "" (empty string), which will lead to an empty response in almost all cases (except for String items that have the state "empty string"). expected behavior after the PR: If the user leaves the field "status" empty within the IFTTT configuration, IFTTT still does the same request as before, but the new implementation returns ALL events related to the specified item. |
OK, I understand the functionality. My only concern is that this is not clear for users, how would they know that passing an empt string changes the functionality? But other then that I don't really see an issue with it. Have you tested this at all to make sure the query logic works? |
Maybe we could adjust the description of the IFTTT field? I didn't test it (just verified the syntax) because I was not sure how to set up a test environment. Is there a documentation somewhere how to get started with openhab-cloud and an IFTTT sandbox? |
@digitaldan: Did you see my last post? |
Bringing this PR back to attention. I haven't looked at the code, but it seems to be just what I need. Thanks for the work @pfink. I came here through https://community.openhab.org/t/trigger-an-ifttt-action-always-when-an-item-changes/43017 , just as the topic starter, I tried to use an empty field or a *. In my opinion a '*' feels more natural. It won't confuse the user to much, definitely if you consider that the average openhab user is tech-savy and probably knows about wildcards. I wouldn't use an empty field as a 'match-for-all' as it is currently implemented by @pfink. What if a user wants to react on an empty String item? my use case: |
@digitaldan Shouldn‘t this one be closed as we removed IFTTT support ? |
This change should make it possible listening to all item changes without being forced to filter the listener events. This can be done now with leaving the field "Changes to" / itemStatus empty.
To be honest, I have no test environment to test this, but I did the change very carefully to the best of my knowledge.
Use case: https://community.openhab.org/t/trigger-an-ifttt-action-always-when-an-item-changes/43017
Signed-off-by: Patrick Fink [email protected]