forked from brutella/hc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
motion_sensor.go
45 lines (32 loc) · 1.2 KB
/
motion_sensor.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// THIS FILE IS AUTO-GENERATED
package service
import (
"github.com/grumpylabs/hcf/characteristic"
)
const TypeMotionSensor = "85"
type MotionSensor struct {
*Service
MotionDetected *characteristic.MotionDetected
StatusActive *characteristic.StatusActive
StatusFault *characteristic.StatusFault
StatusTampered *characteristic.StatusTampered
StatusLowBattery *characteristic.StatusLowBattery
Name *characteristic.Name
}
func NewMotionSensor() *MotionSensor {
svc := MotionSensor{}
svc.Service = New(TypeMotionSensor)
svc.MotionDetected = characteristic.NewMotionDetected()
svc.AddCharacteristic(svc.MotionDetected.Characteristic)
svc.StatusActive = characteristic.NewStatusActive()
svc.AddCharacteristic(svc.StatusActive.Characteristic)
svc.StatusFault = characteristic.NewStatusFault()
svc.AddCharacteristic(svc.StatusFault.Characteristic)
svc.StatusTampered = characteristic.NewStatusTampered()
svc.AddCharacteristic(svc.StatusTampered.Characteristic)
svc.StatusLowBattery = characteristic.NewStatusLowBattery()
svc.AddCharacteristic(svc.StatusLowBattery.Characteristic)
svc.Name = characteristic.NewName()
svc.AddCharacteristic(svc.Name.Characteristic)
return &svc
}