public enum StructureChangeKind
- Object
- Enum<StructureChangeKind>
- StructureChangeKind
ImplementsComparable<StructureChangeKind>
What moved in the home, for HomeStructureEvent.
These say the graph snapshot you are holding is out of date. Call
SmartHome.refresh() and wait for it to complete before reading the graph
again: SmartHome.getStructures() answers from the last refresh, so on its
own it hands back the same stale snapshot the event just told you about.
They never carry trait values – those arrive through a
TraitSubscription, which is a separate mechanism with separate delivery
guarantees.
Enum constants
STRUCTURES_CHANGED | A home was added or removed, or the set of homes the user has granted access to changed. |
ACCESSORY_ADDED | An accessory joined a home. |
ACCESSORY_REMOVED | An accessory left a home. |
ACCESSORY_RENAMED | An accessory was renamed by the user in their ecosystem app. |
ACCESSORY_MOVED | An accessory moved to a different room. |
REACHABILITY_CHANGED | An accessory became reachable or unreachable. |
SCENES_CHANGED | A scene was created, changed or deleted. |
AVAILABILITY_CHANGED | SmartHome.getAvailability() now answers something different – the user granted or revoked access, signed in or out, or installed the provider the backend was waiting for. |
Methods
public static StructureChangeKind[] values() | |
public static StructureChangeKind valueOf(String name) |
Inherited methods
Enum constant details
STRUCTURES_CHANGED
STRUCTURES_CHANGEDACCESSORY_ADDED
ACCESSORY_ADDEDACCESSORY_REMOVED
ACCESSORY_REMOVEDAn accessory left a home.
Anything you had persisted about it – a favourite, a widget – now
points at nothing, and a write to it will fail with
HomeError.ACCESSORY_NOT_FOUND.
ACCESSORY_RENAMED
ACCESSORY_RENAMEDACCESSORY_MOVED
ACCESSORY_MOVEDREACHABILITY_CHANGED
REACHABILITY_CHANGEDAn accessory became reachable or unreachable.
The most frequent kind by a wide margin, and the one worth handling
separately: a whole graph re-fetch on every reachability flap is
wasteful, and updating one row’s availability indicator is usually all
that is wanted. HomeStructureEvent.getAccessoryId() names the
accessory. When a bridge drops, expect one of these per accessory
behind it.
SCENES_CHANGED
SCENES_CHANGEDAVAILABILITY_CHANGED
AVAILABILITY_CHANGEDSmartHome.getAvailability() now answers something different – the
user granted or revoked access, signed in or out, or installed the
provider the backend was waiting for. Ask again.Method details
values
public static StructureChangeKind[] values()valueOf
public static StructureChangeKind valueOf(String name)