kotlin-homie / org.homieiot / Property

Property

interface Property<T>

A Homie Property

Properties

id

abstract val id: String

Unique ID that conforms to Homie convention for IDs

name

abstract val name: String?

User supplied friendly name for property

Functions

subscribe

abstract fun subscribe(update: (PropertyUpdate<T>) -> Unit): Unit

Called when the controller sends a property update

update

abstract fun update(t: T): Unit

Submits an update to controller