Skip to content

set(propertyId:to:)

Function to change the value of a property

swift
func set<T>(propertyId: UInt16, to value: T) async throws -> [FlakePropertyProtocol] where T : FlakePropertyType

Return Value

An array of FlakePropertyProtocol since changing one Value may trigger changes to others or itself

Parameters

  • property: id of the Property to change
  • to value: new value

Discussion

The device of this request may decide to adjust the value, for example if there are max and min values. This will be represented in the returned FlakePropertyProtocol array