kotlin-homie / org.homieiot / Node / float

float

fun float(id: String, name: String? = null, type: PropertyType = PropertyType.STATE, unit: String? = null, range: ClosedFloatingPointRange<Double>? = null, init: Property<Double>.() -> Unit = {}): Property<Double>

Add a property of type float to this node

Parameters

id - Each property of a node must have a unique id which adheres to the homie id convention

name - Friendly name of the property, defaults to the supplied id

type - Specifies the org.homieiot.PropertyType of property that is modeled

range - Specifies a range of acceptable values

unit - Unit of this property, homie convention specifies some recommended units

init - Block to embed org.homieiot.Property.subscribe and org.homieiot.Property.update functions for this property