device

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	ConfigurationUrl *string `json:"configuration_url,omitempty"` // "A link to the webpage that can manage the configuration of this device. Can be either an HTTP or HTTPS link."
	Connections      *string `json:"connections,omitempty"`       // "A list of connections of the device to the outside world as a list of tuples `[connection_type, connection_identifier]`. For example the MAC address of a network interface: `\"connections\": [[\"mac\", \"02:5b:26:a8:dc:12\"]]`."
	Identifiers      *string `json:"identifiers,omitempty"`       // "A list of IDs that uniquely identify the device. For example a serial number."
	Manufacturer     *string `json:"manufacturer,omitempty"`      // "The manufacturer of the device."
	Model            *string `json:"model,omitempty"`             // "The model of the device."
	Name             *string `json:"name,omitempty"`              // "The name of the device."
	SuggestedArea    *string `json:"suggested_area,omitempty"`    // "Suggest an area if the device isn’t in one yet."
	SwVersion        *string `json:"sw_version,omitempty"`        // "The firmware version of the device."
	ViaDevice        *string `json:"via_device,omitempty"`        // "Identifier of a device that routes messages between this device and Home Assistant. Examples of such devices are hubs, or parent devices of a sub-device. This is used to show device topology in Home Assistant."
	// contains filtered or unexported fields
}

func New

func New(name, identifier, model, manufacturer, swVersion string) *Device

func (*Device) Add

func (d *Device) Add(entity entities.Entity) error

func (*Device) GetUniqueId

func (d *Device) GetUniqueId() string

func (*Device) Initialize

func (d *Device) Initialize() error

func (*Device) SetMQTTFields

func (d *Device) SetMQTTFields(client mqtt.Client)

func (*Device) Subscribe

func (d *Device) Subscribe()

func (*Device) UnSubscribe

func (d *Device) UnSubscribe()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL