HAResponseRenderTemplate

public struct HAResponseRenderTemplate : HADataDecodable

Template rendered event

  • The result of the template render

    Note that this can be any type: number, string, boolean, dictionary, array, etc. Templates are rendered into native JSON types and we cannot make a client-side type-safe value here.

    Declaration

    Swift

    public var result: Any
  • What listeners apply to the requested template

    Declaration

    Swift

    public var listeners: Listeners
  • The listeners for the template render

    For example, listening to ‘all’ entities (via accessing all states) or to certain entities. This is potentially useful to display when configuring a template as it will provide context clues about the performance of a particular template.

    See more

    Declaration

    Swift

    public struct Listeners : HADataDecodable
  • Create with data

    Throws

    If any required keys are missing

    Declaration

    Swift

    public init(data: HAData) throws

    Parameters

    data

    The data from the server

  • Create with information

    Declaration

    Swift

    public init(result: Any, listeners: Listeners)

    Parameters

    result

    The result of the render template

    listeners

    The listeners of the render template