HomeConfig

class HomeConfig


Stores common config for configuring the behavior of the SDK.

Summary

Public companion properties

Boolean

Public constructors

HomeConfig(
    strictOperationValidation: Boolean,
    coroutineContext: CoroutineContext?,
    factoryRegistry: FactoryRegistry
)

Public properties

CoroutineContext?

Coroutine context for the Home API.

FactoryRegistry

A registry of traits and device types to be used by the SDK.

CoroutineScope
Boolean

If true, throws an exception when interacting with an unsupported trait or command.

Public companion properties

DEFAULT_STRICT_OPERATION_VALIDATION

val DEFAULT_STRICT_OPERATION_VALIDATIONBoolean

Public constructors

HomeConfig

HomeConfig(
    strictOperationValidation: Boolean = DEFAULT_STRICT_OPERATION_VALIDATION,
    coroutineContext: CoroutineContext? = null,
    factoryRegistry: FactoryRegistry = FactoryRegistry()
)

Public properties

coroutineContext

val coroutineContextCoroutineContext?

Coroutine context for the Home API. MUST be provided for Permissions with OAuth if InteractionClient is null. Should NOT be on the Main thread.

factoryRegistry

val factoryRegistryFactoryRegistry

A registry of traits and device types to be used by the SDK. MUST be provided and include any traits and device types the client depends on and uses with the SDK. Otherwise, any operations that require getting traits or device types will fail with a HomeException.Codes.SDK_INITIALIZATION_MISSING_INFO error.

scope

val scopeCoroutineScope

strictOperationValidation

val strictOperationValidationBoolean

If true, throws an exception when interacting with an unsupported trait or command. If false will try to send the command/attribute write and return an error if the device does not support it.