func NewWindowCovering() *WindowCovering { svc := WindowCovering{} svc.Service = New(TypeWindowCovering) svc.CurrentPosition = characteristic.NewCurrentPosition() svc.AddCharacteristic(svc.CurrentPosition.Characteristic) svc.TargetPosition = characteristic.NewTargetPosition() svc.AddCharacteristic(svc.TargetPosition.Characteristic) svc.PositionState = characteristic.NewPositionState() svc.AddCharacteristic(svc.PositionState.Characteristic) return &svc }
func NewDoor() *Door { svc := Door{} svc.Service = New(TypeDoor) svc.CurrentPosition = characteristic.NewCurrentPosition() svc.AddCharacteristic(svc.CurrentPosition.Characteristic) svc.PositionState = characteristic.NewPositionState() svc.AddCharacteristic(svc.PositionState.Characteristic) svc.TargetPosition = characteristic.NewTargetPosition() svc.AddCharacteristic(svc.TargetPosition.Characteristic) return &svc }