model

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoValueFound = errors.New("no value found")
View Source
var ErrNotFound = errors.New("not found")
View Source
var ErrNotReady = errors.New("not ready")
View Source
var NoMatchingDeviceTypeFound = errors.New("unable to find matching device type")

Functions

This section is empty.

Types

type DeviceType

type DeviceType struct {
	Id          string             `json:"id"`
	Name        string             `json:"name"`
	Description string             `json:"description"`
	Attributes  []models.Attribute `json:"attributes"`
	Services    []Service          `json:"services"`
}

type Interaction added in v1.1.0

type Interaction = models.Interaction

type Service added in v1.1.0

type Service struct {
	Id          string             `json:"id"`
	LocalId     string             `json:"local_id"`
	Name        string             `json:"name"`
	Interaction Interaction        `json:"interaction"`
	Attributes  []models.Attribute `json:"attributes"`
}

type ZigbeeDeviceInfo

type ZigbeeDeviceInfo struct {
	IeeeAddress        string                     `json:"ieee_address"`
	FriendlyName       string                     `json:"friendly_name"`
	Manufacturer       string                     `json:"manufacturer"` //do not use for senergy-device-type identification. instead use ZigbeeDeviceInfoDefinition.Vendor
	ModelId            string                     `json:"model_id"`     //do not use for senergy-device-type identification. instead use ZigbeeDeviceInfoDefinition.Model
	Supported          bool                       `json:"supported"`
	Disabled           bool                       `json:"disabled"`
	InterviewCompleted bool                       `json:"interview_completed"`
	Definition         ZigbeeDeviceInfoDefinition `json:"definition"`
}

type ZigbeeDeviceInfoDefinition

type ZigbeeDeviceInfoDefinition struct {
	Description string                    `json:"description"`
	Model       string                    `json:"model"`
	Vendor      string                    `json:"vendor"`
	Exposes     []ZigbeeDeviceInfoFeature `json:"exposes"`
}

type ZigbeeDeviceInfoFeature

type ZigbeeDeviceInfoFeature struct {
	Type        string                          `json:"type"`
	Name        string                          `json:"name,omitempty"`
	Property    string                          `json:"property,omitempty"`
	Access      int                             `json:"access,omitempty"`
	Description string                          `json:"description,omitempty"`
	Features    []ZigbeeDeviceInfoFeature       `json:"features,omitempty"`
	ItemType    []ZigbeeDeviceInfoFeature       `json:"item_type,omitempty"`
	Unit        string                          `json:"unit,omitempty"`
	Values      []interface{}                   `json:"values,omitempty"`
	ValueMax    float64                         `json:"value_max,omitempty"`
	ValueMin    float64                         `json:"value_min,omitempty"`
	ValueOff    interface{}                     `json:"value_off,omitempty"`
	ValueOn     interface{}                     `json:"value_on,omitempty"`
	ValueToggle interface{}                     `json:"value_toggle,omitempty"`
	Presets     []ZigbeeDeviceInfoFeaturePreset `json:"presets,omitempty"`
}

type ZigbeeDeviceInfoFeaturePreset

type ZigbeeDeviceInfoFeaturePreset struct {
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Value       interface{} `json:"value"`
}

Jump to

Keyboard shortcuts

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