Light conditions
State
Outside light
Declaration
getOutsideLight()
Discussion
Measured outside illuminance
Example
val state:LightConditions.State
assertTrue(state.outsideLight.value?.value == 111000.0)
assertTrue(state.outsideLight.value?.unit == Illuminance.Unit.LUX)
// Outside illuminance is 111'000.0lux
Inside light
Declaration
getInsideLight()
Discussion
Measured inside illuminance
Example
val state:LightConditions.State
assertTrue(state.insideLight.value?.value == 0.25)
assertTrue(state.insideLight.value?.unit == Illuminance.Unit.LUX)
// Inside illuminance is 0.25lux
Getters
Get Light Conditions property availability information
Declaration
public GetLightConditionsAvailability()
public GetLightConditionsAvailability(byte... propertyIdentifiers)
Example
// get all property availabilities
val getAvailability = GetLightConditionsAvailability()
// get outsideLight and insideLight property availabilities
val getAvailabilityProperties = GetLightConditionsAvailability(0x01, 0x02)
Get light conditions
Declaration
public GetLightConditions()
public GetLightConditions(byte... propertyIdentifiers)
Example
// get all properties
val getState = GetLightConditions()
// get outsideLight and insideLight properties
val getStateProperties = GetLightConditions(0x01, 0x02)