HAP.Accessory (HAP v0.4.0) View Source

Represents a single accessory object, containing a number of services

Link to this section Summary

Types

The firmware recvision of this accessory, for example '1.0' or '1.0.1'

The manufacturer of this accessory, for example 'HAP Co.'

The model of this accessory, for example 'HAP Light Bulb Supreme'

The name to advertise for this accessory, for example 'HAP Light Bulb'

The serial number of this accessory, for example '0012345'

t()

Represents an accessory consisting of a number of services. Contains the following fields

Link to this section Types

Specs

firmware_revision() :: String.t()

The firmware recvision of this accessory, for example '1.0' or '1.0.1'

Specs

manufacturer() :: String.t()

The manufacturer of this accessory, for example 'HAP Co.'

Specs

model() :: String.t()

The model of this accessory, for example 'HAP Light Bulb Supreme'

Specs

name() :: String.t()

The name to advertise for this accessory, for example 'HAP Light Bulb'

Specs

serial_number() :: String.t()

The serial number of this accessory, for example '0012345'

Specs

t() :: %HAP.Accessory{
  firmware_revision: firmware_revision(),
  manufacturer: manufacturer(),
  model: model(),
  name: name(),
  serial_number: serial_number(),
  services: [HAP.Service.t()]
}

Represents an accessory consisting of a number of services. Contains the following fields:

  • name: The name to assign to this accessory, for example 'Ceiling Fan'
  • model: The model name to assign to this accessory, for example 'FanCo Whisper III'
  • manufacturer: The manufacturer of this accessory, for example 'FanCo'
  • serial_number: The serial number of this accessory, for example '0012345'
  • firmware_revision: The firmware revision of this accessory, for example '1.0'
  • services: A list of services to include in this accessory