instance

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Battery added in v1.5.0

type Battery struct {
	attribute.Int
}

func NewBattery added in v1.5.0

func NewBattery() *Battery

NewBattery 电量

type Brightness

type Brightness struct {
	attribute.Int
}

func NewBrightness

func NewBrightness() *Brightness

type ColorTemp

type ColorTemp struct {
	attribute.Int
}

func NewColorTemp

func NewColorTemp() *ColorTemp

type CurrentState added in v1.5.0

type CurrentState struct {
	attribute.Int
}

CurrentState 当前状态

func NewCurrentState added in v1.5.0

func NewCurrentState() *CurrentState

type Curtain

type Curtain struct {
	CurrentPosition *Position `tag:"required"` // 当前位置 0-100 TODO 不可写字段
	TargetPosition  *Position `tag:"required"` // 目标位置 0-100
	State           *State    `tag:"required"` // 0关1开2暂停
	Style           *Style    // 0左右1左开2右开3上下

	// TODO 考虑窗帘和窗帘控制器分开定义
	Direction  *Direction // 0默认方向1反方向
	UpperLimit *Limit     // 0删除1设置
	LowerLimit *Limit     // 0删除1设置
}

Curtain 窗帘

func (Curtain) InstanceName

func (c Curtain) InstanceName() string

type Detected added in v1.5.0

type Detected struct {
	attribute.Int
}

func NewDetected added in v1.5.0

func NewDetected() *Detected

NewDetected 侦查

type Direction

type Direction struct {
	attribute.Enum
}

Direction 方向

func NewDirection

func NewDirection() *Direction

type Hue

type Hue struct {
	attribute.Int
}

func NewHue

func NewHue() *Hue

type Humidity added in v1.5.0

type Humidity struct {
	attribute.Int
}

Humidity 湿度

func NewHumidity added in v1.5.0

func NewHumidity() *Humidity

type Info

type Info struct {
	Name         *attribute.Name
	Identity     *attribute.Identity     `tag:"required"`
	Model        *attribute.Model        `tag:"required"`
	Manufacturer *attribute.Manufacturer `tag:"required"`
	Version      *attribute.Version
}

func (Info) InstanceName

func (i Info) InstanceName() string

type LeakDetected added in v1.5.0

type LeakDetected struct {
	attribute.Int
}

LeakDetected 0:表示未检测到水浸 1:表示检测到水浸

func NewLeakDetected added in v1.5.0

func NewLeakDetected() *LeakDetected

type LightBulb

type LightBulb struct {
	Power      *attribute.Power `tag:"required"`
	ColorTemp  *ColorTemp
	Brightness *Brightness
	Hue        *Hue
	Saturation *Saturation
	RGB        *RGB
}

func (LightBulb) InstanceName

func (l LightBulb) InstanceName() string

type Limit

type Limit struct {
	attribute.Enum
}

Limit 上/下限

func NewLimit

func NewLimit() *Limit

type MotionSensor added in v1.5.0

type MotionSensor struct {
	Detected *Detected
	Battery  *Battery
}

MotionSensor 人体传感器

func (MotionSensor) InstanceName added in v1.5.0

func (w MotionSensor) InstanceName() string

type Outlet

type Outlet struct {
	Power *attribute.Power `tag:"required"`
}

func (Outlet) InstanceName

func (o Outlet) InstanceName() string

type Position

type Position struct {
	attribute.Int
}

Position 窗帘行程位置

func NewPosition

func NewPosition() *Position

type RGB

type RGB struct {
	attribute.Int
}

func NewRGB

func NewRGB() *RGB

type Saturation

type Saturation struct {
	attribute.Int
}

func NewSaturation

func NewSaturation() *Saturation

type SecuritySystem added in v1.5.0

type SecuritySystem struct {
	TargetState  *TargetState
	CurrentState *CurrentState
}

SecuritySystem 安全系统

func (SecuritySystem) InstanceName added in v1.5.0

func (w SecuritySystem) InstanceName() string

type State

type State struct {
	attribute.Enum
}

State 窗帘状态

func NewState

func NewState() *State

type Style

type Style struct {
	attribute.Enum
}

Style 窗帘样式

func NewStyle

func NewStyle() *Style

type Switch

type Switch struct {
	Power *attribute.Power `tag:"required"`
}

func (Switch) InstanceName

func (l Switch) InstanceName() string

type TargetState added in v1.5.0

type TargetState struct {
	attribute.Int
}

TargetState 目标状态

func NewTargetState added in v1.5.0

func NewTargetState() *TargetState

type TempHumiditySensor added in v1.5.0

type TempHumiditySensor struct {
	Temperature *Temperature
	Humidity    *Humidity
	Battery     *Battery
}

TempHumiditySensor 温湿度传感器

func (TempHumiditySensor) InstanceName added in v1.5.0

func (w TempHumiditySensor) InstanceName() string

type Temperature added in v1.5.0

type Temperature struct {
	attribute.Int
}

Temperature 温度

func NewTemperature added in v1.5.0

func NewTemperature() *Temperature

type WaterLeakSensor added in v1.5.0

type WaterLeakSensor struct {
	LeakDetected *LeakDetected
	Battery      *Battery
}

WaterLeakSensor 水浸传感器

func (WaterLeakSensor) InstanceName added in v1.5.0

func (w WaterLeakSensor) InstanceName() string

type WindowDoorClose added in v1.5.0

type WindowDoorClose struct {
	attribute.Int
}

func NewWindowDoorClose added in v1.5.0

func NewWindowDoorClose() *WindowDoorClose

type WindowDoorSensor added in v1.5.0

type WindowDoorSensor struct {
	WindowDoorClose *WindowDoorClose
	Battery         *Battery
}

WindowDoorSensor 门窗传感器

func (WindowDoorSensor) InstanceName added in v1.5.0

func (w WindowDoorSensor) InstanceName() string

Jump to

Keyboard shortcuts

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