Interface HomeChangeListener
public interface HomeChangeListener
Told when a watched Trait changes value.
Attached by SmartHome.subscribe(SubscriptionRequest, HomeChangeListener).
Deliveries arrive on the EDT, so a listener may touch components directly.
Nothing wakes your app for these
On every backend, changes arrive only while your app is running. HomeKit
delivers HMAccessoryDelegate callbacks to a foreground app, and the
Google Home APIs need a live signed-in client -- it is the home hub, not
your app, that reacts to a sensor while the phone is asleep. Where
TraitSubscription.isPushDelivery() answers false, changes arrive only
when you call SmartHome.drainChanges().
-
Method Summary
Modifier and TypeMethodDescriptionvoidtraitsChanged(TraitChangeBatch batch) One or more watched traits changed.
-
Method Details
-
traitsChanged
One or more watched traits changed.
Check
TraitChangeBatch.isResyncRequired()before trusting values this batch does not mention.Parameters
batch: the coalesced changes, nevernull
-