HomeKit event trigger does not correctly evaluate condition
| Originator: | matthias.hochgatterer | ||
| Number: | rdar://23357083 | Date Originated: | 2015-11-02 |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | iOS 9.0 |
| Classification: | Serious Bug | Reproducible: |
Summary: If the condition of an event trigger is created using `HMEventTrigger.predicateForEvaluatingTriggerOccurringOnDateWithComponents(...)`, the condition never evaluates to true. Steps to Reproduce: 1. Download HMCatalog project, setup HomeKit, create a scene and event trigger 2. Add event to trigger (e.g. door is opened) 3. Add scene to trigger (e.g. turn on all lights) 4. Add a time condition to the event trigger which evaluates for a specific time using `HMEventTrigger.predicateForEvaluatingTriggerOccurringOnDateWithComponents(...)` (e.g. at 8:50) 5. Create the event for the trigger by opening the door at 8:50 Expected Results: The scene, which turns on the lights, is executed. Actual Results: The scene is not executed because the condition evaluates to false even though the time is 8:50. Version: iOS 9 Notes: It doesn't matter what properties of the date components are set – year, month, and day to represent a date or weekday – "on date" predicates always evaluate to false. Predicates created using `HMEvenTrigger.predicateForEvaluatingTriggerOccurringBeforeDateWithComponents()` and `HMEventTrigger.predicateForEvaluatingTriggerOccurringAfterDateWithComponents()` work as expected. Configuration: iPhone
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!