Listeners

public struct Listeners : HADataDecodable

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.

  • all

    All states are listened to

    Declaration

    Swift

    public var all: Bool
  • The current time is listened to

    Declaration

    Swift

    public var time: Bool
  • Entities that are listened to

    Declaration

    Swift

    public var entities: [String]
  • Domains (e.g. light) that are listened to

    Declaration

    Swift

    public var domains: [String]
  • 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(
        all: Bool,
        time: Bool,
        entities: [String],
        domains: [String]
    )

    Parameters

    all

    Whether all states are listened to

    time

    Whether the current time is listened to

    entities

    Entities that are listened to

    domains

    Domains that are listened to