Documentation
¶
Index ¶
- type Battery
- type Brightness
- type ColorTemp
- type CurrentState
- type Curtain
- type Detected
- type Direction
- type Hue
- type Humidity
- type Info
- type LeakDetected
- type LightBulb
- type Limit
- type MotionSensor
- type Outlet
- type Position
- type RGB
- type Saturation
- type SecuritySystem
- type State
- type Style
- type Switch
- type TargetState
- type TempHumiditySensor
- type Temperature
- type WaterLeakSensor
- type WindowDoorClose
- type WindowDoorSensor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Brightness ¶
func NewBrightness ¶
func NewBrightness() *Brightness
type ColorTemp ¶
func NewColorTemp ¶
func NewColorTemp() *ColorTemp
type CurrentState ¶ added in v1.5.0
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 ¶
type Humidity ¶ added in v1.5.0
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 ¶
type LeakDetected ¶ added in v1.5.0
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 ¶
type MotionSensor ¶ added in v1.5.0
MotionSensor 人体传感器
func (MotionSensor) InstanceName ¶ added in v1.5.0
func (w MotionSensor) InstanceName() string
type Outlet ¶
func (Outlet) InstanceName ¶
type Saturation ¶
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 Switch ¶
func (Switch) InstanceName ¶
type TargetState ¶ added in v1.5.0
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
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
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
Click to show internal directories.
Click to hide internal directories.