State Bean Model interface - maintains the state of KOS device state properties.

This interface represents the public API for StateBean models, providing reactive access to device state properties through an observable Map structure. The interface supports real-time synchronization with device state via WebSocket topics.

interface StateBeanModel<T> {
    id: string;
    path: string;
    props: StatePropsMap<T>;
    updateModel(options): void;
}

Type Parameters

  • T extends Record<string, StatePropertyTypes> = Record<string, StatePropertyTypes>

Methods

Properties

Methods

  • Update model configuration

    Parameters

    Returns void

Properties

id: string

Unique model identifier

path: string

State path being monitored

Reactive Map of state properties