forked from brutella/hc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
carbon_monoxide_sensor.go
53 lines (38 loc) · 1.71 KB
/
carbon_monoxide_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
46
47
48
49
50
51
52
53
// THIS FILE IS AUTO-GENERATED
package service
import (
"github.com/grumpylabs/hcf/characteristic"
)
const TypeCarbonMonoxideSensor = "7F"
type CarbonMonoxideSensor struct {
*Service
CarbonMonoxideDetected *characteristic.CarbonMonoxideDetected
StatusActive *characteristic.StatusActive
StatusFault *characteristic.StatusFault
StatusLowBattery *characteristic.StatusLowBattery
StatusTampered *characteristic.StatusTampered
CarbonMonoxideLevel *characteristic.CarbonMonoxideLevel
CarbonMonoxidePeakLevel *characteristic.CarbonMonoxidePeakLevel
Name *characteristic.Name
}
func NewCarbonMonoxideSensor() *CarbonMonoxideSensor {
svc := CarbonMonoxideSensor{}
svc.Service = New(TypeCarbonMonoxideSensor)
svc.CarbonMonoxideDetected = characteristic.NewCarbonMonoxideDetected()
svc.AddCharacteristic(svc.CarbonMonoxideDetected.Characteristic)
svc.StatusActive = characteristic.NewStatusActive()
svc.AddCharacteristic(svc.StatusActive.Characteristic)
svc.StatusFault = characteristic.NewStatusFault()
svc.AddCharacteristic(svc.StatusFault.Characteristic)
svc.StatusLowBattery = characteristic.NewStatusLowBattery()
svc.AddCharacteristic(svc.StatusLowBattery.Characteristic)
svc.StatusTampered = characteristic.NewStatusTampered()
svc.AddCharacteristic(svc.StatusTampered.Characteristic)
svc.CarbonMonoxideLevel = characteristic.NewCarbonMonoxideLevel()
svc.AddCharacteristic(svc.CarbonMonoxideLevel.Characteristic)
svc.CarbonMonoxidePeakLevel = characteristic.NewCarbonMonoxidePeakLevel()
svc.AddCharacteristic(svc.CarbonMonoxidePeakLevel.Characteristic)
svc.Name = characteristic.NewName()
svc.AddCharacteristic(svc.Name.Characteristic)
return &svc
}