Ejemplo n.º 1
0
func NewDoorbell() *Doorbell {
	svc := Doorbell{}
	svc.Service = New(TypeDoorbell)

	svc.ProgrammableSwitchEvent = characteristic.NewProgrammableSwitchEvent()
	svc.AddCharacteristic(svc.ProgrammableSwitchEvent.Characteristic)

	return &svc
}
func NewStatelessProgrammableSwitch() *StatelessProgrammableSwitch {
	svc := StatelessProgrammableSwitch{}
	svc.Service = New(TypeStatelessProgrammableSwitch)

	svc.ProgrammableSwitchEvent = characteristic.NewProgrammableSwitchEvent()
	svc.AddCharacteristic(svc.ProgrammableSwitchEvent.Characteristic)

	return &svc
}