homie-ts

View the Project on GitHub ibloat/homie-ts

Home > @ibloat/homie-ts > encodePayload

encodePayload function

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Encodes a payload to be set as a property value on the Property topic

Signature:

encodePayload

Returns: string

Parameters

Parameter Type Description
type PropertyType the property type
payload object | string | number | boolean | ColorRGB | ColorHSV the value to encode
format string the format to adhere to